Should fix #9210 and re-allow empty arguments like command '' <more arg...> or command "" <more args...>.
[Qt] Console: allow empty arguments #9329
pull jonasschnelli wants to merge 3 commits into bitcoin:master from jonasschnelli:2016/12/fix_qt_empty_args changing 2 files +72 −21-
jonasschnelli commented at 2:43 PM on December 12, 2016: contributor
- jonasschnelli added the label GUI on Dec 12, 2016
-
luke-jr commented at 10:24 PM on December 12, 2016: member
Maybe add a unit test to check this case?
-
luke-jr commented at 11:04 PM on December 12, 2016: member
This doesn't appear to actually fix the problem at all: https://github.com/luke-jr/bitcoin/commit/3710cf35cd9bf2106a8c75d065ebc5c6f35b37a5
-
[Qt] Console: allow empty arguments 89c8d2c12c
-
Qt/Test: Check handling of empty arguments in RPC debug console 6a32c0f69d
- jonasschnelli force-pushed on Dec 13, 2016
-
jonasschnelli commented at 8:18 AM on December 13, 2016: contributor
Added @luke-jr's unit test, added some more fixes.
-
luke-jr commented at 10:03 AM on December 13, 2016: member
Here's a few more, including one that fails:
RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,abc)"); QVERIFY(result == "[\"abc\",\"\",\"abc\"]"); RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,)"); // this one fails QVERIFY(result == "[\"abc\",\"\",\"\"]"); RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc )"); QVERIFY(result == "[\"abc\"]"); RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc)"); QVERIFY(result == "[\"abc\"]"); -
[Qt] Console: don't allow empty arguments when using the comma-syntax 390bd14684
-
jonasschnelli commented at 8:06 AM on December 14, 2016: contributor
Added more rules and tests. Now, empty arguments are no longer supported when using the comma-syntax. Examples
- [NOK]
command <arg0>,,<arg2> - [OK]
command <arg0>,"",<arg2> - [NOK]
command(<arg0>,,<arg2>) - [NOK]
command(<arg0>,) - [OK]
command <arg0> "" <arg2> - [OK]
command( <arg0> , <arg2> )
- [NOK]
-
laanwj commented at 4:08 PM on December 15, 2016: member
Now, empty arguments are no longer supported when using the comma-syntax.
Makes sense, I think. Thanks for adding tests :) code-review-ACK 413ce40
- laanwj requested review from laanwj on Dec 15, 2016
- laanwj approved
- laanwj merged this on Dec 19, 2016
- laanwj closed this on Dec 19, 2016
- laanwj referenced this in commit db45ad8516 on Dec 19, 2016
- luke-jr referenced this in commit d63d8ab60d on Dec 21, 2016
- luke-jr referenced this in commit 4fce7fc0e8 on Dec 21, 2016
- luke-jr referenced this in commit 93bef6355a on Dec 21, 2016
- codablock referenced this in commit 6e11b14913 on Jan 18, 2018
- andvgal referenced this in commit 71c9a36707 on Jan 6, 2019
- CryptoCentric referenced this in commit 6d9a89446b on Feb 26, 2019
- furszy referenced this in commit ac4c11f26c on Aug 19, 2021
- DrahtBot locked this on Sep 8, 2021
Contributors
Labels