Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix cookie value parsing
Cookie value(according to RFC6265) can contain US-ASCII characters excluding CTLs, whitespace, DQUOTE, comma, semicolon and backslash: cookie-header = "Cookie:" OWS cookie-string OWS cookie-string = cookie-pair *( ";" SP cookie-pair ) cookie-pair = cookie-name "=" cookie-value cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E But mochiweb_cookie:parse_cookie() use smaller allowed characters list. For example, if cookie value is base64 string like MQ==, then parse_cookie() makes it MQ. Fix this by using a separate function for value parsing instead of read_token().
- Loading branch information