| Summary: | [Curl] Implement default cookie path handling correctly as outlined in RFC6265. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <Basuke.Suzuki> | ||||||
| Component: | Platform | Assignee: | Basuke Suzuki <Basuke.Suzuki> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | achristensen, ap, Basuke.Suzuki, chris.reid, commit-queue, darin, ews-watchlist, galpeter, webkit-bug-importer, youennf | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
Created attachment 347192 [details]
PATCH
Created attachment 347196 [details]
PATCH
Comment on attachment 347196 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=347196&action=review > Source/WebCore/platform/network/curl/CookieUtil.cpp:189 > + if (!lastSlashPosition) notFound (In reply to Alex Christensen from comment #3) > Comment on attachment 347196 [details] > PATCH > > View in context: > https://bugs.webkit.org/attachment.cgi?id=347196&action=review > > > Source/WebCore/platform/network/curl/CookieUtil.cpp:189 > > + if (!lastSlashPosition) > > notFound I think this confusion is from the style checker complaining about comparison with 0 and !lastSlashPosition was done to make it happy. We do actually want to check if the lastSlashPosition is 0 so '/path' returns '/' instead of empty string. We also know that there is always at least one slash in the path string from the condition above. I think it should be changed to lastSlashPosition == 0 ignoring the style checker. Comment on attachment 347196 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=347196&action=review >>> Source/WebCore/platform/network/curl/CookieUtil.cpp:189 >>> + if (!lastSlashPosition) >> >> notFound > > I think this confusion is from the style checker complaining about comparison with 0 and !lastSlashPosition was done to make it happy. > We do actually want to check if the lastSlashPosition is 0 so '/path' returns '/' instead of empty string. We also know that there is always at least one slash in the path string from the condition above. > > I think it should be changed to lastSlashPosition == 0 ignoring the style checker. If path is null, reverseFind returns notFound. We already have a check for that above, so no problem here. Comment on attachment 347196 [details] PATCH Clearing flags on attachment: 347196 Committed r234901: <https://trac.webkit.org/changeset/234901> All reviewed patches have been landed. Closing bug. |
Curl implementation of default cookie path was wrong so that some cookies cannot be accessible. It should be generated as outlined in: https://tools.ietf.org/html/rfc6265#section-5.1.4