Use strict Base64 encoding to prevent bad requests.

This commit is contained in:
rulingcom committed 2024-02-24 12:07:49 +08:00
1 parent 1d9659309b
commit aef6d5f766
1 file changed
+1 -1
+1 -1
View File
@@ -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"