Use strict Base64 encoding to prevent bad requests.
This commit is contained in:
parent
1d9659309b
commit
aef6d5f766
|
@ -8,7 +8,7 @@ module Proxifier
|
|||
|
||||
socket << "CONNECT #{host}:#{port} HTTP/1.1\r\n"
|
||||
socket << "Host: #{host}:#{port}\r\n"
|
||||
socket << "Proxy-Authorization: Basic #{["#{user}:#{password}"].pack("m").chomp}\r\n" if user
|
||||
socket << "Proxy-Authorization: Basic #{Base64.strict_encode64("#{user}:#{password}").chomp}\r\n" if user
|
||||
socket << "User-Agent: #{user_agent}\r\n" if user_agent
|
||||
socket << "\r\n"
|
||||
|
||||
|
|
Loading…
Reference in New Issue