Use strict Base64 encoding to prevent bad requests.

This commit is contained in:
rulingcom 2024-02-24 12:07:49 +08:00
parent 1d9659309b
commit aef6d5f766
1 changed files with 1 additions and 1 deletions

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"