Skip to content
Snippets Groups Projects
Commit debe9c37 authored by David Fifield's avatar David Fifield
Browse files

Bug 28727: remove "broker" and "relay" query string parameters.

These could be misused to cause Snowflake proxies to attempt connect to
unsuspecting third parties.
https://bugs.torproject.org/28727
parent 5817c257
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,8 @@ TODO: More documentation ...@@ -11,8 +11,8 @@ TODO: More documentation
# General snowflake proxy constants. # General snowflake proxy constants.
# For websocket-specific constants, see websocket.coffee. # For websocket-specific constants, see websocket.coffee.
DEFAULT_BROKER = 'snowflake-broker.bamsoftware.com' BROKER = 'snowflake-broker.bamsoftware.com'
DEFAULT_RELAY = RELAY =
host: 'snowflake.bamsoftware.com' host: 'snowflake.bamsoftware.com'
port: '443' port: '443'
# Original non-wss relay: # Original non-wss relay:
...@@ -236,10 +236,7 @@ init = (isNode) -> ...@@ -236,10 +236,7 @@ init = (isNode) ->
# Hook up to the debug UI if available. # Hook up to the debug UI if available.
ui = if isNode then null else new UI() ui = if isNode then null else new UI()
silenceNotifications = Params.getBool(query, 'silent', false) silenceNotifications = Params.getBool(query, 'silent', false)
# Retrieve connectivity information for the Broker and broker = new Broker BROKER
# initialize Snowflake contexts.
brokerUrl = Params.getString(query, 'broker', DEFAULT_BROKER)
broker = new Broker brokerUrl
snowflake = new Snowflake broker, ui snowflake = new Snowflake broker, ui
log '== snowflake proxy ==' log '== snowflake proxy =='
...@@ -251,8 +248,7 @@ init = (isNode) -> ...@@ -251,8 +248,7 @@ init = (isNode) ->
# Otherwise, begin setting up WebRTC and acting as a proxy. # Otherwise, begin setting up WebRTC and acting as a proxy.
log 'Copy-Paste mode detected.' if COPY_PASTE_ENABLED log 'Copy-Paste mode detected.' if COPY_PASTE_ENABLED
dbg 'Contacting Broker at ' + broker.url if not COPY_PASTE_ENABLED dbg 'Contacting Broker at ' + broker.url if not COPY_PASTE_ENABLED
relayAddr = Params.getAddress(query, 'relay', DEFAULT_RELAY) snowflake.setRelayAddr RELAY
snowflake.setRelayAddr relayAddr
snowflake.beginWebRTC() snowflake.beginWebRTC()
# Notification of closing tab with active proxy. # Notification of closing tab with active proxy.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment