Index: Source/platform/weborigin/SecurityOrigin.cpp |
diff --git a/Source/platform/weborigin/SecurityOrigin.cpp b/Source/platform/weborigin/SecurityOrigin.cpp |
index 5404ee5b95b9f9c665feeef3e0c11f9bb9e494a1..c979d83d7b2bf463fa237768070d6e553b813264 100644 |
--- a/Source/platform/weborigin/SecurityOrigin.cpp |
+++ b/Source/platform/weborigin/SecurityOrigin.cpp |
@@ -97,24 +97,19 @@ |
return true; |
// FIXME: Do we need to unwrap the URL further? |
- KURL relevantURL; |
- if (SecurityOrigin::shouldUseInnerURL(url)) { |
- relevantURL = SecurityOrigin::extractInnerURL(url); |
- if (!relevantURL.isValid()) |
- return true; |
- } else { |
- relevantURL = url; |
- } |
+ KURL innerURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url; |
+ |
+ // FIXME: Check whether innerURL is valid. |
// For edge case URLs that were probably misparsed, make sure that the origin is unique. |
// FIXME: Do we really need to do this? This looks to be a hack around a |
// security bug in CFNetwork that might have been fixed. |
- if (schemeRequiresAuthority(relevantURL) && relevantURL.host().isEmpty()) |
+ if (schemeRequiresAuthority(innerURL) && innerURL.host().isEmpty()) |
return true; |
// SchemeRegistry needs a lower case protocol because it uses HashMaps |
// that assume the scheme has already been canonicalized. |
- String protocol = relevantURL.protocol().lower(); |
+ String protocol = innerURL.protocol().lower(); |
if (SchemeRegistry::shouldTreatURLSchemeAsNoAccess(protocol)) |
return true; |