summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ames <gregames@apache.org>2012-04-20 00:20:34 +0200
committerGreg Ames <gregames@apache.org>2012-04-20 00:20:34 +0200
commit456c7d61484ccb055f1b5464050141d957d1ae6b (patch)
tree33b632a28dccdccd6f769be0baaae0ad597a3dea
parentFirst step to make cross compilation a bit easier. (diff)
downloadapache2-456c7d61484ccb055f1b5464050141d957d1ae6b.tar.xz
apache2-456c7d61484ccb055f1b5464050141d957d1ae6b.zip
PR 53104 - %{abc}C truncates cookies whose values contain '='
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1328133 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/loggers/mod_log_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index 026a6cf6d3..bc225cee76 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -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;