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

Git pushed a commit to branch master
in repository ffmpeg.

commit 15b241a1712b215548556afeef12627160a96965
Author:     Yazan Balawneh <[email protected]>
AuthorDate: Thu Sep 17 22:10:19 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Sep 19 18:53:13 2026 +0000

    avformat/http: match cookie paths only at a segment boundary
    
    Fixes: cookie leak to paths sharing a name prefix
    Fixes: u2ys08MO8oEF
    Found-by: Yazan Balawneh, Cystack.ps
---
 libavformat/http.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index f1e5fda68e..bd28e7d191 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1470,8 +1470,13 @@ static int get_cookies(HTTPContext *s, char **cookies, 
const char *path)
 
         // if a cookie path is provided, ensure the request path is within 
that path
         e = av_dict_get(cookie_params, "path", NULL, 0);
-        if (e && av_strncasecmp(path, e->value, strlen(e->value)))
-            goto skip_cookie;
+        if (e) {
+            size_t len = strlen(e->value);
+            if (av_strncasecmp(path, e->value, len) ||
+                (len && path[len] && path[len] != '/' && path[len] != '?' &&
+                 e->value[len - 1] != '/'))
+                goto skip_cookie;
+        }
 
         // cookie parameters match, so copy the value
         if (!*cookies) {

-- 
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