Open Bug 1690739 Opened 4 years ago Updated 2 years ago

"WebDriver:AddCookie" should not secure cookies for insecure connections (HTTP)

Categories

(Remote Protocol :: Marionette, defect, P3)

Default
defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

()

Details

Originally reported as: https://github.com/mozilla/geckodriver/issues/1840

Currently it is possible to set cookies with the secure flag set to true for non-secure connections (HTTP). This should be denied, and probably an error thrown.

The WebDriver spec for that isn't that clear. As such I requested a new issue for the spec so that it's clear how we have to implement it.

As Titus noted on the Github issue there is no need to update the WebDriver spec. The relevant parts can be found here:

https://tools.ietf.org/id/draft-ietf-httpbis-rfc6265bis-05.html#storage-model

  1. If the scheme component of the request-uri does not denote a “secure” protocol (as defined by the user agent), and the cookie’s secure-only-flag is true, then abort these steps and ignore the cookie entirely.

Actually the above is a draft... So I assume https://tools.ietf.org/html/rfc6265#section-4.1.2.5 is the right part to refer here.

I filed https://github.com/w3c/webdriver/issues/1571 to get an agreement on what the right behavior would be.

Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.