Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

take port into account for same-origin domain check #2792

Closed
jeisinger opened this issue Jun 27, 2017 · 6 comments
Closed

take port into account for same-origin domain check #2792

jeisinger opened this issue Jun 27, 2017 · 6 comments
Labels
needs compat analysis needs implementer interest Moving the issue forward requires implementers to express interest normative change security/privacy There are security or privacy implications topic: origin

Comments

@jeisinger
Copy link
Member

we should consider not ignoring the port when comparing two origins with "same-origin domain".

I added a counter to Blink for how often we see document.domain being set when the port of the origin is not the default port, and so far (on beta) it looks like that almost never happens.

I'll report back once we hit stable.

Is there a fundamental reason why we can't do that?

/cc @mikewest @annevk @domenic @bzbarsky

@annevk
Copy link
Member

annevk commented Jun 28, 2017

The reason I can think of is that it might break sites (which could be unseen intranet deployments) and user expectations (it's always been a stated feature).

@annevk annevk added needs compat analysis needs implementer interest Moving the issue forward requires implementers to express interest normative change security/privacy There are security or privacy implications topic: origin labels Jun 28, 2017
@jeisinger
Copy link
Member Author

I've added use counters in Blink. Apparently, document.domain is set when the origin has the default port on 0.009705% of page loads, and with a non-default port for 0.000005% of page loads.

Note that I'd be interested in implementing this :)

@annevk
Copy link
Member

annevk commented Jul 10, 2017

What do we do with cookies and WebAuthn? (They're meant to reuse "is a registrable domain suffix of or is equal to".)

@equalsJeffH
Copy link

HSTS's behavior is another consideration here -- enforcing HSTS Policy effectively uses "is a registrable domain suffix of or is equal to" matching, regardless of the presence of an explicit port. see also: https://tools.ietf.org/html/rfc6797#section-8.3 and https://tools.ietf.org/html/rfc6797#appendix-A item 6.

See also: [JacksonBarth2008] http://seclab.stanford.edu/websec/origins/fgo.pdf

@annevk
Copy link
Member

annevk commented Jul 31, 2018

Given whatwg/fetch#687 (comment) and w3c/webauthn#873 I suggest we close this. If we cannot get this adopted for new mechanisms I don't think it's worth the effort to try to enable it for document.domain and cookies.

@annevk
Copy link
Member

annevk commented Aug 7, 2018

Closing due to lack of success in getting this idea adopted in old or new technology.

@annevk annevk closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs compat analysis needs implementer interest Moving the issue forward requires implementers to express interest normative change security/privacy There are security or privacy implications topic: origin
Development

No branches or pull requests

3 participants