diff options
| author | MeshCollider <[email protected]> | 2019-01-03 23:54:19 +1300 |
|---|---|---|
| committer | MeshCollider <[email protected]> | 2019-01-09 17:32:35 +1300 |
| commit | 8cff83124bcac936ecc6add6dca72b125a79a08f (patch) | |
| tree | 115734b79c3499e49865e52c1ae2272aa1dd053d /test/functional/feature_config_args.py | |
| parent | Merge #15081: Doc: Update release notes for master through to 2019-01-01 (diff) | |
| download | discoin-8cff83124bcac936ecc6add6dca72b125a79a08f.tar.xz discoin-8cff83124bcac936ecc6add6dca72b125a79a08f.zip | |
Error if rpcpassword contains hash in conf sections
Diffstat (limited to 'test/functional/feature_config_args.py')
| -rwxr-xr-x | test/functional/feature_config_args.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py index d87eabaa6..4b3f6603a 100755 --- a/test/functional/feature_config_args.py +++ b/test/functional/feature_config_args.py @@ -34,6 +34,14 @@ class ConfArgsTest(BitcoinTestFramework): self.nodes[0].assert_start_raises_init_error(expected_msg='Error reading configuration file: parse error on line 3, using # in rpcpassword can be ambiguous and should be avoided') with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: + conf.write('server=1\nrpcuser=someuser\nmain.rpcpassword=some#pass') + self.nodes[0].assert_start_raises_init_error(expected_msg='Error reading configuration file: parse error on line 3, using # in rpcpassword can be ambiguous and should be avoided') + + with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: + conf.write('server=1\nrpcuser=someuser\n[main]\nrpcpassword=some#pass') + self.nodes[0].assert_start_raises_init_error(expected_msg='Error reading configuration file: parse error on line 4, using # in rpcpassword can be ambiguous and should be avoided') + + with open(inc_conf_file_path, 'w', encoding='utf-8') as conf: conf.write('testnot.datadir=1\n[testnet]\n') self.restart_node(0) self.nodes[0].stop_node(expected_stderr='Warning: Section [testnet] is not recognized.' + os.linesep + 'Warning: Section [testnot] is not recognized.') |