Encode forward slashes in rpcauth passwords.
This commit is contained in:
parent
7caac8a8eb
commit
20b405a944
@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2020-2022 tecnovert
|
# Copyright (c) 2020-2023 tecnovert
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@ -169,5 +169,5 @@ def make_rpc_func(port, auth, wallet=None, host='127.0.0.1'):
|
|||||||
|
|
||||||
def escape_rpcauth(auth_str: str) -> str:
|
def escape_rpcauth(auth_str: str) -> str:
|
||||||
username, password = auth_str.split(':', 1)
|
username, password = auth_str.split(':', 1)
|
||||||
password = urllib.parse.quote(password)
|
password = urllib.parse.quote(password, safe='')
|
||||||
return f'{username}:{password}'
|
return f'{username}:{password}'
|
||||||
|
Loading…
Reference in New Issue
Block a user