0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 12:22:16 +02:00

fix google favicon download over https

This commit is contained in:
thez3ro 2017-07-02 11:39:52 +02:00 committed by Janek Bevendorff
parent bb50db40d2
commit 9ceadac299
2 changed files with 4 additions and 4 deletions

View File

@ -802,13 +802,13 @@ QString Entry::resolveUrl(const QString& url) const
} }
QUrl uurl = QUrl(newurl); QUrl uurl = QUrl(newurl);
if(uurl.scheme() == "cmd") { if (uurl.scheme() == "cmd") {
// URL is a cmd, hopefully the second argument it's an URL // URL is a cmd, hopefully the second argument is an URL
QStringList cmd = newurl.split(" "); QStringList cmd = newurl.split(" ");
if (cmd.size() > 1) { if (cmd.size() > 1) {
return resolveUrl(cmd[1].remove("'").remove("\"")); return resolveUrl(cmd[1].remove("'").remove("\""));
} }
} else if(uurl.scheme() == "http" || uurl.scheme() == "https") { } else if (uurl.scheme() == "http" || uurl.scheme() == "https") {
// URL is nice // URL is nice
return uurl.url(); return uurl.url();
} }

View File

@ -242,7 +242,7 @@ void EditWidgetIcons::fetchFaviconFromGoogle(const QString& domain)
if (config()->get("security/IconDownloadFallbackToGoogle", false).toBool() && m_fallbackToGoogle) { if (config()->get("security/IconDownloadFallbackToGoogle", false).toBool() && m_fallbackToGoogle) {
resetFaviconDownload(); resetFaviconDownload();
m_fallbackToGoogle = false; m_fallbackToGoogle = false;
fetchFavicon(QUrl("http://www.google.com/s2/favicons?domain=" + domain)); fetchFavicon(QUrl("https://www.google.com/s2/favicons?domain=" + domain));
} else { } else {
resetFaviconDownload(); resetFaviconDownload();
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon.")); MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));