]> granicus.if.org Git - apache/commitdiff
PR 53104 - %{abc}C truncates cookies whose values contain '='
authorGreg Ames <gregames@apache.org>
Thu, 19 Apr 2012 22:20:34 +0000 (22:20 +0000)
committerGreg Ames <gregames@apache.org>
Thu, 19 Apr 2012 22:20:34 +0000 (22:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328133 13f79535-47bb-0310-9956-ffa450edef68

modules/loggers/mod_log_config.c

index 026a6cf6d3f8dd0c8c8465ed1265493259d8d69c..bc225cee769445d06bbfacc29f43f16a4ef774b2 100644 (file)
@@ -544,10 +544,10 @@ static const char *log_cookie(request_rec *r, char *a)
         while ((cookie = apr_strtok(cookies, ";", &last1))) {
             char *name = apr_strtok(cookie, "=", &last2);
             if (name) {
-                char *value;
+                char *value = name + strlen(name) + 1;
                 apr_collapse_spaces(name, name);
 
-                if (!strcasecmp(name, a) && (value = apr_strtok(NULL, "=", &last2))) {
+                if (!strcasecmp(name, a)) {
                     char *last;
                     value += strspn(value, " \t");  /* Move past leading WS */
                     last = value + strlen(value) - 1;