Open Bug 578042 Opened 15 years ago Updated 3 years ago

Socks proxy broken for mailto: protocol through .pac file but works with manual settings

Categories

(Thunderbird :: Security, defect)

x86
macOS
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: hubbend, Unassigned)

Details

(Whiteboard: dupme)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.4) Gecko/20100608 I currently must go through a SOCKS v5 proxy to access outside mail servers. I tried three setups: 1. Manual proxy configuration in Preferences 2. Automatic proxy config URL w/local .pac file 3. Foxyproxy For 1., the SOCKS host is set to your.socks5.proxy.com and the port 1080. SOCKS V5 is also checked. For 2., the appropriate code in the .pac file is this: if (url.substring(0,4) == "pop:") { return "SOCKS5 your.socks5.proxy.com:1080" + "SOCKS5 your.socks5.proxy.com:1080"; } if (url.substring(0,4) == "imap:") { return "SOCKS5 your.socks5.proxy.com:1080" + "SOCKS5 your.socks5.proxy.com:1080"; } if (url.substring(0,7) == "mailto:") { return "SOCKS5 your.socks5.proxy.com:1080" + "SOCKS5 your.socks5.proxy.com:1080"; } For 3., the correct patterns are setup for the imap:, pop: and mailto: protocols. For 2. and 3., I cannot send mail (using gmail's smtp server - smtp.gmail.com:587) . An error dialog box is popped stating: Send Message Error Sending of message failed. The message could not be sent using SMTP server smtp.gmail.com for an unknown reason. Please verify that your SMTP server settings are correct and try again, or contact your network administrator. Wireshark show that for case 1. (the only one that works), I get the following SOCKS protocol entries: Connect to server request Connect to server response Command request - Connect Command response - Connect For the failing cases 2. and 3., I see the following SOCKS protocol entries: Connect to server request Connect to server response Command Request - Connect[Malformed Packet] Command Response - Connect For the correct case, 1. the SOCKS connect packet looks like this: Version: 5 Command: Connect (1) Reserved: 0x0 Address Type: 1 (IPv4) Remote Address: xx.xx.xx.xx Port: 587 For the failing case (malformed packet) in 2. and 3., the following is seen for the Connect packet: Version: 5 Command: Connect (1) Reserved: 0x0 (should = 0x00) Address Type: 3 (Domain Name) Malformed packet info Hex data for the socks protocol portion of the packet: 05 01 00 03 0e Reproducible: Always Steps to Reproduce: 1. Find a SOCKS v5 server to use 2. Create a .pac file with the following to handle the mailto: protocol: if (url.substring(0,7) == "mailto:") { return "SOCKS5 your.socks5.proxy.com:1080" + "SOCKS5 your.socks5.proxy.com:1080"; } 3. Send a message using gmail's smtp server. Actual Results: Error box is thrown stating Send Message Error. Expected Results: Message should be delivered.
Summary: Socks proxy broken for mailto: protocol through .pac file but work with manual settings → Socks proxy broken for mailto: protocol through .pac file but works with manual settings
Version: unspecified → 3.1
Component: General → Security
QA Contact: general → thunderbird
Whiteboard: dupme
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.