WebSecurityOrigin -> Origin does not preserve suborigin |
||
Issue descriptionThis was recently exposed by https://codereview.chromium.org/2382973002 Looking at the code it seems that serializing a WebSecurityOrigin and passing it to GURL yields a different result than first converting to a Origin and using GetURL(). This is because serializing a SecurityOrigin with a suborigin will yield <scheme>-so://<suborigin>.<origin> I'm not sure the best way to proceed here. Should we modify WebSecurityOrigin -> Origin?
,
Oct 25 2016
I suspect it does, but I can look into it in the morning. In the meantime, maybe try submitting it again, since https://codereview.chromium.org/2403713002 just went through?
,
Oct 25 2016
I'm not sure the CL fixes it, because WebSecurityOrigin operator Origin was not modified. The operator today just passes in the protocol, host and port. It doesn't touch the SubOrigin. Fixing that will require us to modify the Origin constructor so we can initialize an Origin without going through GURL first, ideally.
,
Oct 25 2016
Ah, I see. Yes, I'll work on fixing this and get a CL asap.
,
Oct 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/908428c015af7f9aac62b6377809191d5677ce12 commit 908428c015af7f9aac62b6377809191d5677ce12 Author: jww <jww@chromium.org> Date: Wed Oct 26 21:51:46 2016 Add suborigins to WebSecurityOrigin Suborigins were not passed through conversions from SecurityOrigin -> WebSecurityOrigin, and also not from url::Origin -> WebSecurityOrigin. This CL adds support to make sure they are added to WebSecurityOrigin from their respective origination points, and it also adds accessors to WebSecurityOrigin to get the suborigin value. BUG= 658992 Review-Url: https://codereview.chromium.org/2449233002 Cr-Commit-Position: refs/heads/master@{#427828} [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/content/child/blink_platform_impl_unittest.cc [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/third_party/WebKit/Source/platform/exported/WebSecurityOrigin.cpp [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.h [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/third_party/WebKit/public/platform/WebSecurityOrigin.h [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/url/origin.cc [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/url/origin.h [modify] https://crrev.com/908428c015af7f9aac62b6377809191d5677ce12/url/origin_unittest.cc
,
Oct 26 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by mkwst@chromium.org
, Oct 25 2016Status: Assigned (was: Untriaged)