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

Commit

Permalink
change base64decode to urlsafe_b64decode
Browse files Browse the repository at this point in the history
  • Loading branch information
itaru2622 committed Oct 9, 2021
1 parent 8777271 commit 59e7d11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stream/ws_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from six import StringIO

from websocket import WebSocket, ABNF, enableTrace
from base64 import b64decode
from base64 import urlsafe_b64decode

STDIN_CHANNEL = 0
STDOUT_CHANNEL = 1
Expand Down Expand Up @@ -464,7 +464,7 @@ def websocket_proxycare(connect_opt, configuration, url, headers):
for key,value in configuration.proxy_headers.items():
if key == 'proxy-authorization' and value.startswith('Basic'):
b64value = value.split()[1]
auth = b64decode(b64value).decode().split(':')
auth = urlsafe_b64decode(b64value).decode().split(':')
connect_opt.update({'http_proxy_auth': (auth[0], auth[1]) })
return(connect_opt)

Expand Down

0 comments on commit 59e7d11

Please sign in to comment.