mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-26 17:46:47 -05:00
check if url is valid
This commit is contained in:
parent
a888de19cd
commit
691e60d72b
2 changed files with 17 additions and 13 deletions
|
|
@ -226,7 +226,7 @@ void EditWidgetIcons::fetchFavicon(const QUrl& url)
|
|||
QUrl tempurl = QUrl(m_url);
|
||||
if (tempurl.scheme() == "http") {
|
||||
resetFaviconDownload();
|
||||
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));
|
||||
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon.") + "\n" + tr("Hint: You can enable Google as a fallback under Tools>Settings>Security"));
|
||||
} else {
|
||||
tempurl.setScheme("http");
|
||||
m_url = tempurl.url();
|
||||
|
|
@ -243,7 +243,9 @@ void EditWidgetIcons::fetchFaviconFromGoogle(const QString& domain)
|
|||
if (config()->get("security/IconDownloadFallbackToGoogle", false).toBool() && m_fallbackToGoogle) {
|
||||
resetFaviconDownload();
|
||||
m_fallbackToGoogle = false;
|
||||
fetchFavicon(QUrl("https://www.google.com/s2/favicons?domain=" + domain));
|
||||
QUrl faviconUrl = QUrl("https://www.google.com/s2/favicons");
|
||||
faviconUrl.setQuery("domain=" + domain);
|
||||
fetchFavicon(faviconUrl);
|
||||
} else {
|
||||
resetFaviconDownload();
|
||||
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue