mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00: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:
@@ -43,6 +43,12 @@ export function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, show
|
|||||||
isWebsite = hostnameUri.indexOf("http") === 0 && hostnameUri.indexOf(".") > -1;
|
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) {
|
if (showFavicon && isWebsite) {
|
||||||
try {
|
try {
|
||||||
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
|
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
|
||||||
|
|||||||
Reference in New Issue
Block a user