Skip to content

Commit 108022b

Browse files
laanwjthelazier
authored andcommitted
Merge bitcoin#20741: doc: Update 'Secure string handling'
7117d75 Update 'Secure string handling' (Prayank) Pull request description: - Add information about possible path traversal attack - [wallet_name](https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/createwallet/) (string): _The name for the new wallet. If this is a 'path', the wallet will be created at the 'path' location._ Fixes bitcoin#20128 (Not really fixing it but workaround) This PR is an alternative to bitcoin#20393 ACKs for top commit: michaelfolkson: ACK 7117d75 RiccardoMasutti: ACK bitcoin@7117d75 benthecarman: ACK 7117d75 Tree-SHA512: 0d6c4f8db5feba848bbb583e87a99e6c4b655deaa2b566164e2632acc1aabf470d4626d2dc4b82c4997effc30d9b474d860d0e0d3e896648c5cc9bfdb623da6d
1 parent d331e2b commit 108022b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/JSON-RPC-interface.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ RPC interface will be abused.
8888
- **Secure string handling:** The RPC interface does not guarantee any
8989
escaping of data beyond what's necessary to encode it as JSON,
9090
although it does usually provide serialized data using a hex
91-
representation of the bytes. If you use RPC data in your programs or
92-
provide its data to other programs, you must ensure any problem
93-
strings are properly escaped. For example, multiple websites have
94-
been manipulated because they displayed decoded hex strings that
95-
included HTML `<script>` tags. For this reason, and other
96-
non-security reasons, it is recommended to display all serialized data
97-
in hex form only.
91+
representation of the bytes. If you use RPC data in your programs or
92+
provide its data to other programs, you must ensure any problem strings
93+
are properly escaped. For example, the `createwallet` RPC accepts
94+
arguments such as `wallet_name` which is a string and could be used
95+
for a path traversal attack without application level checks. Multiple
96+
websites have been manipulated because they displayed decoded hex strings
97+
that included HTML `<script>` tags. For this reason, and others, it is
98+
recommended to display all serialized data in hex form only.
9899

99100
## RPC consistency guarantees
100101

0 commit comments

Comments
 (0)