ASF Bugzilla – Attachment 24720 Details for
Bug 48401
CacheIgnoreURLSessionIdentifiers recognizes the wrong key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Alternate approach to fix edge case
pr48401.diff (text/plain), 2.38 KB, created by
Ruediger Pluem
on 2009-12-17 00:37:35 UTC
(
hide
)
Description:
Alternate approach to fix edge case
Filename:
MIME Type:
Creator:
Ruediger Pluem
Created:
2009-12-17 00:37:35 UTC
Size:
2.38 KB
patch
obsolete
>Index: modules/cache/cache_storage.c >=================================================================== >--- modules/cache/cache_storage.c (revision 891573) >+++ modules/cache/cache_storage.c (working copy) >@@ -503,21 +503,42 @@ > /* > * Check if the identifier is in the querystring and cut it out. > */ >- if (querystring >- && (param = strstr(querystring, *identifier)) >- && (*(param + len) == '=') >- ) { >- char *amp; >- >- if (querystring != param) { >- querystring = apr_pstrndup(p, querystring, >- param - querystring); >+ if (querystring) { >+ /* >+ * First check if the identifier is at the beginning of the >+ * querystring and followed by a '=' >+ */ >+ if (!strncmp(querystring, *identifier, len) >+ && (*(querystring + len) == '=')) { >+ param = querystring; > } > else { >- querystring = ""; >+ char *complete; >+ >+ /* >+ * In order to avoid subkey matching (PR 48401) prepend >+ * identifier with a '&' and append a '=' >+ */ >+ complete = apr_pstrcat(p, "&", *identifier, "=", NULL); >+ param = strstr(querystring, complete); >+ /* If we found something we are sitting on the '&' */ >+ if (param) { >+ param++; >+ } > } >- if ((amp = strchr(param + len + 1, '&'))) { >- querystring = apr_pstrcat(p, querystring, amp + 1, NULL); >+ if (param) { >+ char *amp; >+ >+ if (querystring != param) { >+ querystring = apr_pstrndup(p, querystring, >+ param - querystring); >+ } >+ else { >+ querystring = ""; >+ } >+ if ((amp = strchr(param + len + 1, '&'))) { >+ querystring = apr_pstrcat(p, querystring, amp + 1, NULL); >+ } > } > break; > }
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48401
:
24718
| 24720 |
24722
|
24723
|
24727
|
24729