diff options
| author | Ross Nicoll <[email protected]> | 2021-02-27 22:59:23 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-27 22:59:23 +0000 |
| commit | 4ffde07033db7a019c59671297f5ae75e488884c (patch) | |
| tree | 58c3edebf0ce8f35a7b6f26996e579280fdde864 /src | |
| parent | Formatting in "Development Tips and Tricks" (#1766) (diff) | |
| parent | [qt] only allow https explorer links (diff) | |
| download | discoin-4ffde07033db7a019c59671297f5ae75e488884c.tar.xz discoin-4ffde07033db7a019c59671297f5ae75e488884c.zip | |
Merge pull request #1770 from patricklodder/1.14.3-url-sanity-check
[qt] only allow https explorer links
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/transactionview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 30f4db945..eae920ed4 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -220,8 +220,9 @@ void TransactionView::setModel(WalletModel *_model) QStringList listUrls = _model->getOptionsModel()->getThirdPartyTxUrls().split("|", QString::SkipEmptyParts); for (int i = 0; i < listUrls.size(); ++i) { - QString host = QUrl(listUrls[i].trimmed(), QUrl::StrictMode).host(); - if (!host.isEmpty()) + QUrl url = QUrl(listUrls[i].trimmed(), QUrl::StrictMode); + QString host = url.host(); + if (!host.isEmpty() && url.scheme() == "https") { QAction *thirdPartyTxUrlAction = new QAction(host, this); // use host as menu item label if (i == 0) |