-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve validation of txprepare
arguments
#4259
Commits on Dec 8, 2020
-
pyln: Remove deprecated txprepare variant
We promised to deprecate the old "destination satoshi feerate utxos" variant some time on mid-2020 so let's do just that. `txprepare` doesn't parse it either anymore. Changelog-Changed: pyln: `txprepare` no longer supports the deprecated `destination satoshi feerate utxos` call format.
Configuration menu - View commit details
-
Copy full SHA for d78192f - Browse repository at this point
Copy the full SHA d78192fView commit details -
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 ElementsProject#4238
Configuration menu - View commit details
-
Copy full SHA for a84d570 - Browse repository at this point
Copy the full SHA a84d570View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25d7158 - Browse repository at this point
Copy the full SHA 25d7158View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23d1670 - Browse repository at this point
Copy the full SHA 23d1670View commit details -
txprepare: Verify that outputs arg is an array
We were not checking that outputs is indeed an array, and just going ahead creating the array of outputs. Since `tok->size` for a string is 0 we ended up ignoring the argument altogether and thus the created transaction would end up only with a single change output. Fixes ElementsProject#4258
Configuration menu - View commit details
-
Copy full SHA for c6b0f15 - Browse repository at this point
Copy the full SHA c6b0f15View commit details -
Configuration menu - View commit details
-
Copy full SHA for e80f298 - Browse repository at this point
Copy the full SHA e80f298View commit details -
jsonrpc: Forward errors on malformed requests to cli
We were masquerading errors when parsing the request by reporting only a bogus malformed `id` field in the response, when the real issue was that we were unable to parse the request in the first place (which caused the null-id error to be returned). Fixes ElementsProject#4238
Configuration menu - View commit details
-
Copy full SHA for 2652fae - Browse repository at this point
Copy the full SHA 2652faeView commit details -
cli: Add a JSON parsing sanity check before sending request
If some parameter is malformed on the command line we could end up with a malformed JSON-RPC request, which would then result in very unhelpful error messages. Fixes ElementsProject#4238 Changelog-Changed: cli: `lightning-cli` now performs better sanity checks on the JSON-RPC requests it sends.
Configuration menu - View commit details
-
Copy full SHA for 067aff8 - Browse repository at this point
Copy the full SHA 067aff8View commit details -
bitcoin/tx: fix type of outpoint (n is a u32), simplify json_to_outpoint
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for f7568ea - Browse repository at this point
Copy the full SHA f7568eaView commit details -
common/json_tok: minor cleanup to bitcoin_outpoint array parsing.
No reason to use a temp var here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Configuration menu - View commit details
-
Copy full SHA for 859bb42 - Browse repository at this point
Copy the full SHA 859bb42View commit details