mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Handle Site Preferences URLs as lower case
This commit is contained in:
parent
7191471ed7
commit
faa3d78f5c
2 changed files with 5 additions and 5 deletions
|
|
@ -644,7 +644,7 @@ kpxc.url = null;
|
|||
// Add page to Site Preferences with Username-only detection enabled. Set from the popup
|
||||
kpxc.addToSitePreferences = async function() {
|
||||
// Returns a predefined URL for certain sites
|
||||
let site = trimURL(window.top.location.href);
|
||||
let site = trimURL(window.top.location.href).toLowerCase();
|
||||
|
||||
// Check if the site already exists -> update the current settings
|
||||
let siteExists = false;
|
||||
|
|
@ -1437,11 +1437,11 @@ kpxc.siteIgnored = async function(condition) {
|
|||
if (kpxc.settings.sitePreferences) {
|
||||
let currentLocation;
|
||||
try {
|
||||
currentLocation = window.top.location.href;
|
||||
currentLocation = window.top.location.href.toLowerCase();
|
||||
} catch (err) {
|
||||
// Cross-domain security error inspecting window.top.location.href.
|
||||
// This catches an error when an iframe is being accessed from another (sub)domain -> use the iframe URL instead.
|
||||
currentLocation = window.self.location.href;
|
||||
currentLocation = window.self.location.href.toLowerCase();
|
||||
}
|
||||
|
||||
const currentSetting = condition || IGNORE_FULL;
|
||||
|
|
|
|||
|
|
@ -502,14 +502,14 @@ options.initSitePreferences = function() {
|
|||
trClone.removeClass('clone d-none');
|
||||
|
||||
const tr = trClone.clone(true);
|
||||
tr.data('url', value);
|
||||
tr.data('url', value.toLowerCase());
|
||||
tr.attr('id', 'tr-scf' + newValue);
|
||||
tr.children('td:first').text(value);
|
||||
tr.children('td:nth-child(2)').children('select').val(IGNORE_NOTHING);
|
||||
$('#tab-site-preferences table tbody:first').append(tr);
|
||||
$('#tab-site-preferences table tbody:first tr.empty:first').hide();
|
||||
|
||||
options.settings['sitePreferences'].push({ url: value, ignore: IGNORE_NOTHING, usernameOnly: false });
|
||||
options.settings['sitePreferences'].push({ url: value.toLowerCase(), ignore: IGNORE_NOTHING, usernameOnly: false });
|
||||
options.saveSettings();
|
||||
manualUrl.value = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue