aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-04-30 13:05:30 +0200
committerMacroFake <falke.marco@gmail.com>2022-04-30 12:53:35 +0200
commitfa12706fc6dbaf82eca37f30afa07c37fcd44932 (patch)
tree81bf4a4b55ee0d74562fbd0729b6300455f2bd10 /test
parent5d53cf38784df9ad9ed10306bf3fba3002fd9244 (diff)
downloadbitcoin-fa12706fc6dbaf82eca37f30afa07c37fcd44932.tar.xz
Reject invalid rpcauth formats
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/rpc_users.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py
index 7cedb4336b..1a35a57802 100755
--- a/test/functional/rpc_users.py
+++ b/test/functional/rpc_users.py
@@ -107,6 +107,9 @@ class HTTPBasicsTest(BitcoinTestFramework):
self.stop_node(0)
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo'])
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo:bar'])
+ self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo:bar:baz'])
+ self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo$bar:baz'])
+ self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo$bar$baz'])
self.log.info('Check that failure to write cookie file will abort the node gracefully')
cookie_file = os.path.join(get_datadir_path(self.options.tmpdir, 0), self.chain, '.cookie.tmp')