Changeset 61391 in webkit
- Timestamp:
- Jun 18, 2010 3:28:46 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61390 r61391 1 2010-06-18 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 noAccess url schemes block access to inline stylesheets 6 https://bugs.webkit.org/show_bug.cgi?id=32309 7 8 Test that data URLs can access their inline style sheets. 9 10 * http/tests/security/data-url-inline.css-expected.txt: Added. 11 * http/tests/security/data-url-inline.css.html: Added. 12 1 13 2010-06-18 Adam Barth <abarth@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r61390 r61391 1 2010-06-18 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 noAccess url schemes block access to inline stylesheets 6 https://bugs.webkit.org/show_bug.cgi?id=32309 7 8 Instead of using baseURL() to grab the security context we should just 9 use finalURL directly. When I wrote the original patch that added this 10 security check, finalURL didn't exist yet. 11 12 If finalURL is an empty URL, that means we generated the style sheet 13 from text that didn't have a URL. It would be slightly safer to store 14 a bit on CSSStyleSheet indicating whether it came from an inline style 15 sheet, but I think this check is fairly accurate. 16 17 Test: http/tests/security/data-url-inline.css.html 18 19 * css/CSSStyleSheet.cpp: 20 (WebCore::CSSStyleSheet::cssRules): 21 1 22 2010-06-18 Adam Barth <abarth@webkit.org> 2 23 -
trunk/WebCore/css/CSSStyleSheet.cpp
r61073 r61391 135 135 } 136 136 137 138 137 PassRefPtr<CSSRuleList> CSSStyleSheet::cssRules(bool omitCharsetRules) 139 138 { 140 if (doc() && !doc()->securityOrigin()->canRequest(baseURL())) 139 KURL url = finalURL(); 140 if (!url.isEmpty() && doc() && !doc()->securityOrigin()->canRequest(url)) 141 141 return 0; 142 142 return CSSRuleList::create(this, omitCharsetRules);
Note: See TracChangeset
for help on using the changeset viewer.