From ea46fd747dbbf3c8cdf897a653f29fa9e24e602a Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 27 May 2024 19:54:38 +0300 Subject: [PATCH] Ignore all ports by default in Site Preferences --- keepassxc-browser/common/global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keepassxc-browser/common/global.js b/keepassxc-browser/common/global.js index 9f073db..46559e0 100755 --- a/keepassxc-browser/common/global.js +++ b/keepassxc-browser/common/global.js @@ -87,8 +87,8 @@ const siteMatch = function(site, url) { const siteUrl = new URL(site); const currentUrl = new URL(url); - // Match scheme and port - if (siteUrl.protocol !== currentUrl.protocol || siteUrl.port !== currentUrl.port) { + // Match scheme and port. If Site Preferences does not use a port, all ports are ignored. + if (siteUrl.protocol !== currentUrl.protocol || (siteUrl.port && siteUrl.port !== currentUrl.port)) { return false; }