diff --git a/src/ChangeLog b/src/ChangeLog index bc766eb2..bd10d2f1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-02 Giuseppe Scrivano <giuseppe@southpole.se> + + * cookies.c (parse_set_cookie): If the value is quoted, do not modify + it. + Reported by: Nirgal Vourg�re <jmv_deb@nirgal.com> + 2011-07-29 Giuseppe Scrivano <giuseppe@southpole.se> * log.c (logprintf): Exit immediately on a SIGPIPE error. diff --git a/src/cookies.c b/src/cookies.c index 2e416886..7c3fb1cb 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -350,6 +350,13 @@ parse_set_cookie (const char *set_cookie, bool silent) goto error; if (!value.b) goto error; + + /* If the value is quoted, do not modify it. */ + if (*(value.b - 1) == '"') + value.b--; + if (*value.e == '"') + value.e++; + cookie->attr = strdupdelim (name.b, name.e); cookie->value = strdupdelim (value.b, value.e);