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

Git pushed a commit to branch master
in repository ffmpeg.

commit 369544c6090f938a4e2b6b642071e8aad18a2f20
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 18:56:11 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 19 02:29:52 2026 +0000

    avformat/httpcookie: ignore Expires without a valid date and empty Domain 
attributes
    
    They replaced a valid Expires or Domain given earlier in the cookie, which
    then did not expire or was no longer sent to the hosts of its Domain.
    
    Fixes: cookies with a second, invalid Expires or Domain
---
 libavformat/httpcookie.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/httpcookie.c b/libavformat/httpcookie.c
index fa546cefdc..ef90c400c0 100644
--- a/libavformat/httpcookie.c
+++ b/libavformat/httpcookie.c
@@ -166,6 +166,11 @@ int ff_http_parse_set_cookie(const char *set_cookie, 
AVDictionary **cookie, AVDi
         // an invalid Max-Age is ignored (RFC 6265 5.2.2)
         if (!av_strcasecmp(param, "max-age") && (!value || 
!is_delta_seconds(value)))
             continue;
+        // an Expires without a valid date and an empty Domain are ignored 
(RFC 6265 5.2.1, 5.2.3)
+        if (!av_strcasecmp(param, "expires") && (!value || 
ff_http_parse_date(value, &(struct tm){ 0 }) < 0))
+            continue;
+        if (!av_strcasecmp(param, "domain") && (!value || !*value))
+            continue;
         if (*param)
             ret = av_dict_set(attributes, param, value ? value : "", 0);
     }

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