The Samba-Bugzilla – Attachment 13058 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 URL Escaping Path Qualifier
0001-s3-rpc_server-Character-Encode-Spotlight-Queries.patch (text/plain), 1.64 KB, created by
mmpestorich
on 2017-03-14 17:53:10 UTC
(
hide
)
Description:
Patch for URL Escaping Path Qualifier
Filename:
MIME Type:
Creator:
mmpestorich
Created:
2017-03-14 17:53:10 UTC
Size:
1.64 KB
patch
obsolete
>From e0410fb9c58f2ce82fd18c2b617f57e1a28bb03a Mon Sep 17 00:00:00 2001 >From: Mike M Pestorich <mmpestorich@gmail.com> >Date: Fri, 19 Aug 2016 21:59:22 -0700 >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. > >Signed-off-by: Mike M Pestorich <mmpestorich@gmail.com> >(similar to github.com/netatalk/netatalk/commit/90aa43d) >--- > source3/rpc_server/mdssvc/mdssvc.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c >index 44d7703..53214d5 100644 >--- a/source3/rpc_server/mdssvc/mdssvc.c >+++ b/source3/rpc_server/mdssvc/mdssvc.c >@@ -1135,7 +1135,7 @@ static bool slrpc_open_query(struct mds_ctx *mds_ctx, > sl_cnids_t *cnids; > struct sl_query *slq = NULL; > int result; >- char *querystring; >+ char *querystring, *scope; > > array = dalloc_zero(reply, sl_array_t); > if (array == NULL) { >@@ -1214,16 +1214,18 @@ 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 = g_uri_escape_string(dalloc_get(path_scope, "char *", 0), >+ G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, TRUE); >+ if (scope == NULL) { > goto error; > } > >- slq->path_scope = talloc_strdup(slq, slq->path_scope); >+ slq->path_scope = talloc_strdup(slq, scope); > if (slq->path_scope == NULL) { > goto error; > } > >+ g_free(scope); > > reqinfo = dalloc_value_for_key(query, "DALLOC_CTX", 0, > "DALLOC_CTX", 1, "kMDAttributeArray"); >-- >2.7.4 (Apple Git-66) >
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