Closed Bug 1579552 Opened 5 years ago Closed 5 years ago

Firefox is not complying with RFC6265 regarding processing the path attribute of cookies

Categories

(Core :: Networking: Cookies, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: muhammad1reda, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

I sent this header from my server "set-cookie: foo=1; path=/bar/"
then I requested /bar

Actual results:

Firefox sent the cookie to /bar

Expected results:

Firefox should not send this cookie to /bar .It only can send it to /bar/ or longer paths according to RFC 6265 path and path-match section

Chrome doesn't send it, here I posted a question on stackoverflow.com

https://stackoverflow.com/questions/57827565/firefox-is-not-complying-with-rfc6265-regarding-processing-the-path-attribute-of

Component: Untriaged → Networking: Cookies
Product: Firefox → Core

I think Chrome behavior is correct. Ehsan, can you take a look?

Flags: needinfo?(ehsan)

Yes, our path matching algorithm is completely different than the spec. Comparing to Chrome's they seeming to be following the spec pretty closely.

Flags: needinfo?(ehsan)
Assignee: nobody → ehsan
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7449f505167b
Update the cookie path matching algorithm per RFC6265; r=baku
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1583211
Regressions: 1583273
QA Whiteboard: [qa-71b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: