Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
index b0384923791a4bd42c6956d96f9ef662d7b9a0c8..b536c23b2e08a8e872464deefd1930c3d1b1d82c 100644 |
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp |
@@ -113,6 +113,13 @@ static bool verifyProtocolHandlerScheme(const String& scheme, const String& meth |
return false; |
} |
+ // The specification requires that schemes don't contain colons. |
+ size_t index = scheme.find(':'); |
+ if (index != kNotFound) { |
+ exceptionState.throwDOMException(SyntaxError, "The scheme '" + scheme + "' contains colon."); |
+ return false; |
+ } |
+ |
if (isProtocolWhitelisted(scheme)) |
return true; |
exceptionState.throwSecurityError("The scheme '" + scheme + "' doesn't belong to the protocol whitelist. Please prefix non-whitelisted schemes with the string 'web+'."); |