Ignore case in the check for security origin inheritance
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jun 2016 19:50:45 +0000 (19:50 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jun 2016 19:50:45 +0000 (19:50 +0000)
commita97090dfa883abf5b171e66b3db740499a1e2003
tree502a5ad554a82e9d0b5e708970fefc935831661f
parent0ec1e1572541d37cab31558470129674e24d525c
Ignore case in the check for security origin inheritance
https://bugs.webkit.org/show_bug.cgi?id=158878

Reviewed by Alex Christensen.

Source/WebCore:

Darin Adler commented in https://bugs.webkit.org/show_bug.cgi?id=158855:
"Are these comparisons intentionally case sensitive? Shouldn’t they ignore ASCII
case? We could use equalIgnoringASCIICase and equalLettersIgnoringASCIICase for
those two lines instead of using ==. URL::parse normalizes letters in the scheme
and host by using toASCIILower, but does not normalize letters elsewhere in the
URL, such as in the "blank" or "srcdoc" in the above URLs."

Test: http/tests/dom/window-open-about-uppercase-blank-and-access-document.html

* platform/URL.cpp:
(WebCore::URL::shouldInheritSecurityOriginFromOwner):

LayoutTests:

* http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt: Added.
* http/tests/dom/window-open-about-uppercase-blank-and-access-document.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/URL.cpp