WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
16192
Support TLD check when changing document.domain
https://bugs.webkit.org/show_bug.cgi?id=16192
Summary
Support TLD check when changing document.domain
Feng Qian
Reported
2007-11-29 11:00:25 PST
When assigning a new domain name to document.domain, it needs to check the new domain name is more than a top level domain. e.g., 'com', 'co.uk' are not allowed. This is just a short description. I need to do more research on what exactly to support.
Attachments
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2008-04-16 09:29:14 PDT
I'm unclear what that would do? Besides make it so that your page suddenly couldn't access any domain-based secured information?
Adam Barth
Comment 2
2008-04-16 17:47:59 PDT
Setting your document.domain to "com" or "" will let almost every web site access your DOM, cookies, etc, by setting their document.domain to the same value. Internet Explorer and Firefox prevent web sites from setting their document.domain shorter than an effective TLD + 1 or a "registry controlled" domain. For example, stanford.facebook.com can set its document.domain to "facebook.com" but not to "com". Also, www.hbc.co.uk can set its document.domain to "hbc.co.uk" but not to "co.uk" or to "uk". This restriction is more to prevent web sites from shooting themselves in the foot than to prevent any particular attack.
Adam Barth
Comment 3
2009-05-19 22:15:21 PDT
***
Bug 21318
has been marked as a duplicate of this bug. ***
Adam Barth
Comment 4
2009-05-19 22:15:53 PDT
Bug 21318
has some useful information about this bug.
Pam Greene (IRC:pamg)
Comment 5
2009-10-19 15:11:26 PDT
I'll take a look at bringing a registry-controlled-domain service into WebKit. It does introduce a slight maintenance burden to keep the data file updated, but as long as it's only being used for document.domain restrictions the risk of stale data is only that it won't be as restrictive as it could be; it'll still be safer than now.
David Kilzer (:ddkilzer)
Comment 6
2014-12-07 17:53:55 PST
<
rdar://problem/6266140
>
Simon Pieters (:zcorpan)
Comment 7
2024-09-04 04:24:23 PDT
I believe this is implemented now (see
bug 204878
).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug