This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b6d3ea122067bf0367b4e97d7d0f6e36f29d11fe Author: Michael Niedermayer <[email protected]> AuthorDate: Sat Sep 19 20:59:22 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Wed Sep 23 00:47:59 2026 +0000 avformat/http: match cookie domains against IP addresses exactly RFC 6265 section 5.1.3 --- libavformat/http.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/http.c b/libavformat/http.c index 3abffdbca4..a09e4d6b0a 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -1111,12 +1111,17 @@ static const char *cookie_domain(const AVDictionary *cookie_params) return *domain ? domain : NULL; } +static int host_is_ip_literal(const char *host) +{ + return !host[strspn(host, "0123456789.")] || strchr(host, ':'); +} + static int host_in_cookie_domain(const char *host, const char *domain) { int offset = strlen(host) - strlen(domain); return offset >= 0 && !av_strcasecmp(host + offset, domain) && - (!offset || host[offset - 1] == '.'); + (!offset || (host[offset - 1] == '.' && !host_is_ip_literal(host))); } static int parse_cookie(HTTPContext *s, const char *p, const char *host, -- 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]
