Merge #16858: Qt: advise users not to switch wallets when opening a BIP70 URI.

1153caf78e Qt: advise users not to switch wallets when opening a BIP70 URI. (James Hilliard)

Pull request description:

  It would probably be a good idea to have something like this before #15584 is merged.

ACKs for top commit:
  jonasschnelli:
    utACK 1153caf78e
  fanquake:
    ACK 1153caf78e

Tree-SHA512: 6e682dd280c44eaafb1206c32439df42a20173c33297bf93dd607f0a7a2faec8e2d17fff83c85027083ebd11a71795b443e707992251574370dd1d46b7bff060
This commit is contained in:
Jonas Schnelli 2019-09-15 20:06:26 +02:00
commit a40ccbb195
No known key found for this signature in database
GPG key ID: 1EB776BB03C7922D

View file

@ -328,7 +328,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
#ifndef ENABLE_BIP70 #ifndef ENABLE_BIP70
if (uri.hasQueryItem("r")) { // payment request if (uri.hasQueryItem("r")) { // payment request
Q_EMIT message(tr("URI handling"), Q_EMIT message(tr("URI handling"),
tr("Cannot process payment request because BIP70 support was not compiled in."), tr("Cannot process payment request because BIP70 support was not compiled in.")+
tr("Due to widespread security flaws in BIP70 it's strongly recommended that any merchant instructions to switch wallets be ignored.")+
tr("If you are receiving this error you should request the merchant provide a BIP21 compatible URI."),
CClientUIInterface::ICON_WARNING); CClientUIInterface::ICON_WARNING);
} }
#endif #endif
@ -364,7 +366,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
return; return;
#else #else
Q_EMIT message(tr("Payment request file handling"), Q_EMIT message(tr("Payment request file handling"),
tr("Cannot process payment request because BIP70 support was not compiled in."), tr("Cannot process payment request because BIP70 support was not compiled in.")+
tr("Due to widespread security flaws in BIP70 it's strongly recommended that any merchant instructions to switch wallets be ignored.")+
tr("If you are receiving this error you should request the merchant provide a BIP21 compatible URI."),
CClientUIInterface::ICON_WARNING); CClientUIInterface::ICON_WARNING);
#endif #endif
} }