The built-in SocketMode client fails to establish WS connections via proxy server #1169
Labels
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
socket-mode
Version: 3x
Milestone
Reproducible in:
The Slack SDK version
slack-sdk==3.13.0
Python runtime version
3.6.13
OS info
Steps to reproduce:
http://username:pass%2Fword@example.com
) to a synchronousslack_sdk.socket_mode.SocketModeClient
, either viaHTTPS_PROXY
env variable orproxy
argument.Expected result:
The connection through the proxy is successful.
Actual result:
The connection fails with the following error:
The documentation for urllib.parse.urlparse mentions that % escapes are not expanded, and username and password should not be url-encoded when they are passed as part of a Basic authentication.
As far as I understand the issue is simply that the username and password should be url-decoded before being base64'd in the following code:
python-slack-sdk/slack_sdk/socket_mode/builtin/internals.py
Lines 60 to 64 in 77e906a
(As a side note, printing the full proxy info including the password in the exception is not so great, but that's another issue.)
The text was updated successfully, but these errors were encountered: