Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 59e7d11

Browse files
committed
change base64decode to urlsafe_b64decode
1 parent 8777271 commit 59e7d11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stream/ws_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from six import StringIO
3030

3131
from websocket import WebSocket, ABNF, enableTrace
32-
from base64 import b64decode
32+
from base64 import urlsafe_b64decode
3333

3434
STDIN_CHANNEL = 0
3535
STDOUT_CHANNEL = 1
@@ -464,7 +464,7 @@ def websocket_proxycare(connect_opt, configuration, url, headers):
464464
for key,value in configuration.proxy_headers.items():
465465
if key == 'proxy-authorization' and value.startswith('Basic'):
466466
b64value = value.split()[1]
467-
auth = b64decode(b64value).decode().split(':')
467+
auth = urlsafe_b64decode(b64value).decode().split(':')
468468
connect_opt.update({'http_proxy_auth': (auth[0], auth[1]) })
469469
return(connect_opt)
470470

0 commit comments

Comments
 (0)