Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1673)

Unified Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp

Issue 22985005: The length of scheme is at least five characters even when the scheme has 'web+' prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/unregister-protocol-handler-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index b0d568cc0be973b8515868f83f1af692543b379e..df33faf653a043e35e7e35c781a7440d448ab64e 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -106,7 +106,8 @@ static bool isProtocolWhitelisted(const String& scheme)
static bool verifyProtocolHandlerScheme(const String& scheme, ExceptionState& es)
{
if (scheme.startsWith("web+")) {
- if (isValidProtocol(scheme))
+ // The specification requires that the length of scheme is at least five characteres (including 'web+' prefix).
+ if (scheme.length() >= 5 && isValidProtocol(scheme))
return true;
es.throwDOMException(SecurityError);
return false;
« no previous file with comments | « LayoutTests/fast/dom/unregister-protocol-handler-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698