mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
json: Add two param functions to parse string arrs and outpoint arrs
In a couple of places we accept arrays of strings and don't validate them. If we forward them, e.g., call a JSON-RPC method from the plugin, we end up embedding the unverified string in the JSON-RPC call without escaping, which then leads to invalid JSON being passed on. This at least partially causes #4238
This commit is contained in:
committed by
Rusty Russell
parent
eacc54646f
commit
32000b6660
@@ -21,6 +21,12 @@ struct wally_psbt;
|
||||
struct bitcoin_txid {
|
||||
struct sha256_double shad;
|
||||
};
|
||||
|
||||
struct bitcoin_outpoint {
|
||||
struct bitcoin_txid txid;
|
||||
u16 n;
|
||||
};
|
||||
|
||||
/* Define bitcoin_txid_eq */
|
||||
STRUCTEQ_DEF(bitcoin_txid, 0, shad.sha.u);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user