-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Qt5: Warning users about invalid-BIP21 URI bitcoin:// #12723
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
Conversation
Travis CI failed on 30 minutes timeout in multiple jobs. |
src/qt/guiutil.cpp
Outdated
// which will lower-case it (and thus invalidate the address). | ||
// which will lower-case it (and thus invalidate the address). Workaround only for Qt4 support. | ||
|
||
#if QT_VERSION < 0x050000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO just drop these lines of code (and comment), so that it gets to the error message for Qt4 too. This makes behavior under both consistent. Also: Qt4 support is under-tested and going to be removed in the not-so-far future, so might be better to not have a special, not strictly necessary workaround for it.
I'll review this later. @laanwj how likely is it that QT4 will be removed by the next release? I'd rather not test it :-) |
Concept ACK
|
src/qt/paymentserver.cpp
Outdated
if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI | ||
if (s.startsWith("bitcoin://", Qt::CaseInsensitive)) | ||
{ | ||
Q_EMIT message(tr("URI handling"), tr("'bitcoin://' it's not a correct URI. Use 'bitcoin:' instead."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit s/its/is
utACK 2ad827fd6a3a9d59a13b7226d9159929ec5ab718 |
utACK after squash, this should be one commit |
i'm not sure if it's possible to squash all commits into single one without recreating PR |
That is possible, we do it all the time. See here: https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
2ad827f
to
7ddb674
Compare
Tested on macOS 10.13.3 with Qt 5.10.1
with and without '//' as the URI. master(9b8b107) "bitcoin://" : My only nit would be to swap 'correct' for 'valid' in "'bitcoin://' is not a correct URI". |
7ddb674
to
b7fbcc5
Compare
tACK b7fbcc5 |
b7fbcc5 Qt: Warn users about invalid-BIP21 URI bitcoin:// (Alexey Ivanov) Pull request description: This change affects only Qt5 users, since Qt4 QUrl don't forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux. PR for #11645 Tree-SHA512: 6b8cb18b29dbd2754e190a662ed67274a7f0decc6adb00b7e1af107d5f8ea2845b668cf28d6ccf2f1d15e8ef212f5a76910810634a4c15e7fabd1dd2072e7232
This seems to cause the URI to fail, not just warn. It also affects Qt4 and Qt5 equally. Am I missing something? |
@luke-jr it already failed, but with an incorrect error message. Now it fails with a correct error message. |
I thought this logic avoided the error? |
…in:// b7fbcc5 Qt: Warn users about invalid-BIP21 URI bitcoin:// (Alexey Ivanov) Pull request description: This change affects only Qt5 users, since Qt4 QUrl don't forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux. PR for bitcoin#11645 Tree-SHA512: 6b8cb18b29dbd2754e190a662ed67274a7f0decc6adb00b7e1af107d5f8ea2845b668cf28d6ccf2f1d15e8ef212f5a76910810634a4c15e7fabd1dd2072e7232
…in:// b7fbcc5 Qt: Warn users about invalid-BIP21 URI bitcoin:// (Alexey Ivanov) Pull request description: This change affects only Qt5 users, since Qt4 QUrl don't forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux. PR for bitcoin#11645 Tree-SHA512: 6b8cb18b29dbd2754e190a662ed67274a7f0decc6adb00b7e1af107d5f8ea2845b668cf28d6ccf2f1d15e8ef212f5a76910810634a4c15e7fabd1dd2072e7232
This change affects only Qt5 users, since Qt4 QUrl don't forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux.
PR for #11645