1
0
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:
1fexd 2025-01-09 19:23:17 +01:00 committed by GitHub
parent f1c3c690a7
commit a872f67523
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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`;