aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-04-18 15:22:57 +0100
committerfanquake <fanquake@gmail.com>2023-04-18 15:28:33 +0100
commit15a24781d01847d3acb77607148eae1c05cd5d4f (patch)
tree7618d0ee4e8e5cab9d1be2f38895f38cf6b95064 /test
parent9e05de1d7081decf081d2d7811ae99564da53d87 (diff)
parentdc711fbd32653b09e196f72942106114a32353f4 (diff)
Merge bitcoin/bitcoin#27474: [24.x] Additional backports for 24.1
dc711fbd32653b09e196f72942106114a32353f4 doc: update 24.1 release notes (fanquake) fc8c1a8deb80913ff353c878f494c9eaf28061c0 doc: fix/improve warning helps in {create,load,unload,restore}wallet (Jon Atack) 3a26b19df25ca99a9a58ae5398f6f423ac074368 bugfix: rest: avoid segfault for invalid URI (pablomartin4btc) c40b1da2fd64bb10f120f85966b44f0d2bb315f8 depends: fix compiling bdb with clang-16 on aarch64 (fanquake) 0bac52d5cfaf1a3beb99b780ed7446e2faba877f Don't return OutputType::UNKNOWN in ParseOutputType (Pttn) Pull request description: Backports: * https://github.com/bitcoin/bitcoin/pull/27279 (only f73782a9032a462a71569e9424db9bf9eeababf3) * https://github.com/bitcoin/bitcoin/pull/27462 * https://github.com/bitcoin/bitcoin/pull/27468 * https://github.com/bitcoin/bitcoin/pull/27473 ACKs for top commit: stickies-v: ACK dc711fbd32653b09e196f72942106114a32353f4 hebasto: re-ACK dc711fbd32653b09e196f72942106114a32353f4 jonatack: ACK dc711fbd32653b09e196f72942106114a32353f4 Tree-SHA512: 72c673be82689e3c3a1c2564a1fdd6afe0b357b7aa8bec9524fe6999804fbccf310da0b074e647af14b753e5e695024e268fe4f69aa58747f541f7f429ebede6
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/interface_rest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py
index f36bbda3af..cb1fbdfb7a 100755
--- a/test/functional/interface_rest.py
+++ b/test/functional/interface_rest.py
@@ -281,6 +281,10 @@ class RESTTest (BitcoinTestFramework):
assert_equal(len(json_obj), 1) # ensure that there is one header in the json response
assert_equal(json_obj[0]['hash'], bb_hash) # request/response hash should be the same
+ # Check invalid uri (% symbol at the end of the request)
+ resp = self.test_rest_request(f"/headers/{bb_hash}%", ret_type=RetType.OBJ, status=400)
+ assert_equal(resp.read().decode('utf-8').rstrip(), "URI parsing failed, it likely contained RFC 3986 invalid characters")
+
# Compare with normal RPC block response
rpc_block_json = self.nodes[0].getblock(bb_hash)
for key in ['hash', 'confirmations', 'height', 'version', 'merkleroot', 'time', 'nonce', 'bits', 'difficulty', 'chainwork', 'previousblockhash']: