File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,18 +175,11 @@ function onCookieChanged(changeInfo) {
175175}
176176
177177// This event is needed due to the potential race between cookie permissions
178- // update and cookie transmission, because the cookie API is non-blocking.
179- // It would be less perf impact to have a blocking version of the cookie API
180- // available instead .
178+ // update and cookie transmission ( because the cookie API is non-blocking) .
179+ // Without this function, an aggressive attacker could race to steal a not-yet-secured
180+ // cookie if they controlled & could redirect the user to a non-SSL subdomain .
181181// WARNING: This is a very hot function.
182182function onBeforeSendHeaders ( details ) {
183- // XXX this function appears to enforce something equivalent to the secure
184- // cookie flag by independent means. Is that really what it's supposed to
185- // do?
186- // @@@ Agreed, this function is really weird. I'm not sure it's even useful
187- // since we block WebRequests to HTTP sites (and maybe rewrite them to SSL)
188- // we force cookies to be sent over HTTPS even if they don't have the flag
189- // "Secure" set. (Unless I'm reading this wrong?)
190183 // TODO: Verify this with wireshark
191184 for ( var h in details . requestHeaders ) {
192185 if ( details . requestHeaders [ h ] . name == "Cookie" ) {
You can’t perform that action at this time.
0 commit comments