mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-16 01:21:48 +01:00
fix: Don't try to load icon for .onion/.i2p URIs (#9125)
Co-authored-by: Bernd Schoolmann <mail@quexten.com> Co-authored-by: Jason Ng <jng@bitwarden.com>
This commit is contained in:
parent
f1c3c690a7
commit
a872f67523
@ -43,6 +43,12 @@ export function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, show
|
||||
isWebsite = hostnameUri.indexOf("http") === 0 && hostnameUri.indexOf(".") > -1;
|
||||
}
|
||||
|
||||
if (isWebsite && (hostnameUri.endsWith(".onion") || hostnameUri.endsWith(".i2p"))) {
|
||||
image = null;
|
||||
fallbackImage = "images/bwi-globe.png";
|
||||
break;
|
||||
}
|
||||
|
||||
if (showFavicon && isWebsite) {
|
||||
try {
|
||||
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
|
||||
|
Loading…
Reference in New Issue
Block a user