Changeset 170511 in webkit
- Timestamp:
- Jun 26, 2014 5:27:05 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r170506 r170511 1 2014-06-26 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme() 4 https://bugs.webkit.org/show_bug.cgi?id=134289 5 6 Reviewed by Darin Adler. 7 8 If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow. 9 10 No new tests, covered by existing tests. 11 12 * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: 13 (WebCore::verifyProtocolHandlerScheme): 14 1 15 2014-06-26 Benjamin Poulain <bpoulain@apple.com> 2 16 -
trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp
r169670 r170511 104 104 static bool verifyProtocolHandlerScheme(const String& scheme, ExceptionCode& ec) 105 105 { 106 if (isProtocolWhitelisted(scheme)) 107 return true; 108 106 109 if (scheme.startsWith("web+")) { 107 110 // The specification requires that the length of scheme is at least five characters (including 'web+' prefix). 108 111 if (scheme.length() >= 5 && isValidProtocol(scheme)) 109 112 return true; 110 ec = SECURITY_ERR; 111 return false; 112 } 113 114 if (isProtocolWhitelisted(scheme)) 115 return true; 113 } 116 114 117 115 ec = SECURITY_ERR;
Note: See TracChangeset
for help on using the changeset viewer.