This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 7063ee2f3cd5bb20b778341a6ae368c36792603d
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Nov 7 00:22:09 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 19 02:29:52 2026 +0000

    avformat/httpcookie: strip whitespace around cookie and attribute values
    
    As specified by RFC 6265 section 5.2. "sid= secret" was sent with the
    spaces and "Domain= example.com" matched no host.
    
    Fixes: cookie values with surrounding whitespace
---
 libavformat/httpcookie.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/httpcookie.c b/libavformat/httpcookie.c
index 369a367181..e1ab2a9681 100644
--- a/libavformat/httpcookie.c
+++ b/libavformat/httpcookie.c
@@ -83,7 +83,7 @@ int ff_http_parse_set_cookie(const char *set_cookie, 
AVDictionary **cookie, AVDi
         return AVERROR_INVALIDDATA;
     }
     *eql = '\0';
-    ret = av_dict_set(cookie, trim(param), eql + 1, 0);
+    ret = av_dict_set(cookie, trim(param), trim(eql + 1), 0);
 
     while (ret >= 0 && (param = av_strtok(next_param, ";", &saveptr))) {
         char *value = strchr(param, '=');
@@ -92,7 +92,7 @@ int ff_http_parse_set_cookie(const char *set_cookie, 
AVDictionary **cookie, AVDi
             *value++ = '\0';
         param = trim(param);
         if (*param)
-            ret = av_dict_set(attributes, param, value ? value : "", 0);
+            ret = av_dict_set(attributes, param, value ? trim(value) : "", 0);
     }
 
     av_free(cstr);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to