This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20012 - Security section of Location spec is all broken now
Summary: Security section of Location spec is all broken now
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-20 02:11 UTC by contributor
Modified: 2012-11-20 07:45 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2012-11-20 02:11:09 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html
Multipage: http://www.whatwg.org/C#security-3
Complete: http://www.whatwg.org/c#security-3

Comment:
Security section of Location spec is all broken now

Posted from: 173.48.81.109 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/19.0 Firefox/19.0
Comment 1 Boris Zbarsky 2012-11-20 02:12:03 UTC
Given http://html5.org/r/7513 doing security checks based on the associtated document just doesn't work.  The security section needs to be changed to reflect reality...
Comment 2 Boris Zbarsky 2012-11-20 07:07:38 UTC
For example, reading .href on the location reads the URI of the "relevant Document".  But the security checks are all done against the "associated Document", which is a totally different document, and might not be same-origin with the "relevant document".  This trivially allows cross-origin location reads if actually implemented.
Comment 3 Ian 'Hixie' Hickson 2012-11-20 07:44:55 UTC
Oh, right. The idea here is that you can access your own properties (e.g. to implement a shim for new features), but that you can't access the attributes that the spec defines if the URL is one you shouldn't be able to read. But ok, forget the shimmed properties while the document is cross-origin, we'll just block those. The real ones would be blocked anyway.
Comment 4 contributor 2012-11-20 07:45:29 UTC
Checked in as WHATWG revision r7516.
Check-in comment: Location's security model is actually different than Window's.
http://html5.org/tools/web-apps-tracker?from=7515&to=7516