New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658992 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebSecurityOrigin -> Origin does not preserve suborigin

Project Member Reported by csharrison@chromium.org, Oct 25 2016

Issue description

This 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?
 

Comment 1 by mkwst@chromium.org, Oct 25 2016

Owner: jww@chromium.org
Status: Assigned (was: Untriaged)
jww@: Is this taken care of by https://codereview.chromium.org/2403713002?

Comment 2 by jww@chromium.org, 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?
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.

Comment 4 by jww@chromium.org, Oct 25 2016

Ah, I see. Yes, I'll work on fixing this and get a CL asap.
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Comment 6 by jww@chromium.org, Oct 26 2016

Status: Fixed (was: Assigned)

Sign in to add a comment