The Samba-Bugzilla – Attachment 13063 Details for
Bug 12688
[spotlight] FILTER in generated query doesn't handle nested directories with spaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for master
bug12688-master.patch (text/plain), 1.73 KB, created by
Ralph Böhme
on 2017-03-15 12:42:06 UTC
(
hide
)
Description:
Patch for master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2017-03-15 12:42:06 UTC
Size:
1.73 KB
patch
obsolete
>From 1c18a914deb95f1b2a84e8fe6c04abababb00a65 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Wed, 15 Mar 2017 13:38:19 +0100 >Subject: [PATCH] s3/rpc_server: Character Encode Spotlight Queries > >Fix path escaping in Spotlight so paths with spaces or special >characters can be properly matched to tracker paths. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=12688 > >Based-on-a-patch-from: Mike M Pestorich <mmpestorich@gmail.com> >(similar to github.com/netatalk/netatalk/commit/90aa43d) > >Signed-off-by: Ralph Boehme <slow@samba.org> >--- > source3/rpc_server/mdssvc/mdssvc.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c >index 9be0cc4..20ccb4c 100644 >--- a/source3/rpc_server/mdssvc/mdssvc.c >+++ b/source3/rpc_server/mdssvc/mdssvc.c >@@ -1136,6 +1136,8 @@ static bool slrpc_open_query(struct mds_ctx *mds_ctx, > struct sl_query *slq = NULL; > int result; > char *querystring; >+ char *scope = NULL; >+ char *escaped_scope = NULL; > > array = dalloc_zero(reply, sl_array_t); > if (array == NULL) { >@@ -1214,12 +1216,20 @@ static bool slrpc_open_query(struct mds_ctx *mds_ctx, > goto error; > } > >- slq->path_scope = dalloc_get(path_scope, "char *", 0); >- if (slq->path_scope == NULL) { >+ scope = dalloc_get(path_scope, "char *", 0); >+ if (scope == NULL) { > goto error; > } > >- slq->path_scope = talloc_strdup(slq, slq->path_scope); >+ escaped_scope = g_uri_escape_string(scope, >+ G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, >+ TRUE); >+ if (escaped_scope == NULL) { >+ goto error; >+ } >+ >+ slq->path_scope = talloc_strdup(slq, escaped_scope); >+ g_free(escaped_scope); > if (slq->path_scope == NULL) { > goto error; > } >-- >2.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12688
:
13058
| 13063