Opened 5 years ago

Closed 5 years ago

#3806 closed defect (fixed)

http: get_cookies() breaks for cookies with unexpected parameters and for parameters with spaces

Reported by: cakemonster Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: http cookie
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

If a site sets a cookie that includes (for example) the HttpOnly parameter get_cookies() fails to return that cookie for use with subsequent requests. Instead "Cookie: HttpOnly" is sent to the server.

Also if a site sets the Expires parameter (which includes spaces by definition) the parsing breaks due to the "; " delimiter list to av_strtok and "Cookie: GMT" will be sent instead of the real cookie.

Ugly hack that fixes these 2 cases but will break for any other unknown cookie parameters attached.

Attachments (1)

cookies.patch (1.8 KB) - added by cakemonster 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by cakemonster

comment:1 Changed 5 years ago by cehoyos

Please send two patches that do not include any white space changes to the ffmpeg-devel mailing list where patches are discussed and can be reviewed. Patches on this bug tracker are usually ignored.

comment:2 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed

I believe this was fixed by Nicolas George in 481cbc5a and 4bebce06
Please reopen this ticket if the issue is still reproducible with current FFmpeg git head or 2.4.

Note: See TracTickets for help on using tickets.