Commit 4e2fb0b 1 parent f1ed420 commit 4e2fb0b Copy full SHA for 4e2fb0b
File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 134
134
cookies = [Cookie .parse (res .headers [' set-cookie' ])];
135
135
```
136
136
137
+ _ Potentially non-standard behavior:_ currently, tough-cookie will limit the number of spaces before the ` = ` to 256 characters.
138
+ See [ Issue 92] ( https://github.com/salesforce/tough-cookie/issues/92 )
139
+
137
140
### Properties
138
141
139
142
Cookie object properties:
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ var COOKIE_OCTETS = new RegExp('^'+COOKIE_OCTET.source+'+$');
53
53
54
54
var CONTROL_CHARS = / [ \x00 - \x1F ] / ;
55
55
56
+ // For COOKIE_PAIR and LOOSE_COOKIE_PAIR below, the number of spaces has been
57
+ // restricted to 256 to side-step a ReDoS issue reported here:
58
+ // https://github.com/salesforce/tough-cookie/issues/92
59
+
56
60
// Double quotes are part of the value (see: S4.1.1).
57
61
// '\r', '\n' and '\0' should be treated as a terminator in the "relaxed" mode
58
62
// (see: https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60)
You can’t perform that action at this time.
0 commit comments