GUIUtil::parseBitcoinURI does not check address validity. Therefore, an invalid address cannot cause parsing failure.
An invalid address case is covered by its own message.
This PR fixes the warning messages.
GUIUtil::parseBitcoinURI does not check address validity. Therefore, an invalid address cannot cause parsing failure.
An invalid address case is covered by its own message.
This PR fixes the warning messages.
Do you mind reviewing this PR?
GUIUtil::parseBitcoinURIdoes not check address validity. Therefore, an invalid address cannot cause parsing failure.
If address validity is not checked, can it be the cause for parsing failure?
An invalid address case is covered by its own message “Invalid payment address %1”.
Invalid address case is covered by IsValidDestination() and updated in https://github.com/bitcoin-core/gui/pull/280/ however, if code for else statement is executed can we assume address was never checked for validity?
GUIUtil::parseBitcoinURIdoes not check address validity. Therefore, an invalid address cannot cause parsing failure.If address validity is not checked, can it be the cause for parsing failure?
Internally the GUIUtil::parseBitcoinURI uses the QUrlQuery class, so if an invalid address does not contain delimiters, it shouldn’t cause parsing failure.
An invalid address case is covered by its own message “Invalid payment address %1”.
Invalid address case is covered by
IsValidDestination()and updated in #280 however, if code forelsestatement is executed can we assume address was never checked for validity?
I think we can.
GUIUtil::parseBitcoinURI does not check address validity. Therefore, an
invalid address cannot cause parsing failure.
An invalid address case is covered by its own message "Invalid payment
address %1".
GUIUtil::parseBitcoinURI will return false and https://github.com/hebasto/gui/blob/5b20d46f8be6b7fc08012d80a9fc42e9dbc812ff/src/qt/paymentserver.cpp#L254 will be executed ?
@hebasto Can you share any examples that I can try for which
GUIUtil::parseBitcoinURIwill return false and https://github.com/hebasto/gui/blob/5b20d46f8be6b7fc08012d80a9fc42e9dbc812ff/src/qt/paymentserver.cpp#L254 will be executed ?
I can’t. It looks like this code is never executed due to checks in earlier stages, e.g. in PaymentServer::ipcParseCommandLine.
Closing for now.