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

Unified Diff: Source/modules/websockets/DOMWebSocket.cpp

Issue 908483002: Fix to respect --explicitly-allowed-ports command line option (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | Source/platform/weborigin/KnownPorts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/DOMWebSocket.cpp
diff --git a/Source/modules/websockets/DOMWebSocket.cpp b/Source/modules/websockets/DOMWebSocket.cpp
index ccf4d7f38900365194522e4dd85763a6fac176e1..e9762f7ea320687b250bf99890a3b75eb7c46231 100644
--- a/Source/modules/websockets/DOMWebSocket.cpp
+++ b/Source/modules/websockets/DOMWebSocket.cpp
@@ -53,7 +53,6 @@
#include "platform/Logging.h"
#include "platform/blob/BlobData.h"
#include "platform/heap/Handle.h"
-#include "platform/weborigin/KnownPorts.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/Platform.h"
#include "wtf/Assertions.h"
@@ -305,7 +304,8 @@ void DOMWebSocket::connect(const String& url, const Vector<String>& protocols, E
exceptionState.throwDOMException(SyntaxError, "The URL contains a fragment identifier ('" + m_url.fragmentIdentifier() + "'). Fragment identifiers are not allowed in WebSocket URLs.");
return;
}
- if (!portAllowed(m_url)) {
+
+ if (!Platform::current()->portAllowed(m_url)) {
m_state = CLOSED;
exceptionState.throwSecurityError("The port " + String::number(m_url.port()) + " is not allowed.");
return;
« no previous file with comments | « no previous file | Source/platform/weborigin/KnownPorts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698