mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Add Disable passkeys for Site Preferences features
This commit is contained in:
parent
bbff228b40
commit
b439017d0f
6 changed files with 14 additions and 6 deletions
|
|
@ -120,6 +120,7 @@
|
|||
"IGNORE_FULL": "readonly",
|
||||
"IGNORE_NORMAL": "readonly",
|
||||
"IGNORE_NOTHING": "readonly",
|
||||
"IGNORE_PASSKEYS": "readonly",
|
||||
"importScripts": "readonly",
|
||||
"IMPROVED_DETECTION_PREDEFINED_SITELIST": "readonly",
|
||||
"initColorTheme": "readonly",
|
||||
|
|
|
|||
|
|
@ -1118,8 +1118,8 @@
|
|||
"message": "Page URL",
|
||||
"description": "Site Preferences list column title."
|
||||
},
|
||||
"optionsColumnIgnore": {
|
||||
"message": "Ignore",
|
||||
"optionsColumnFeatures": {
|
||||
"message": "Features",
|
||||
"description": "Site Preferences list column title."
|
||||
},
|
||||
"optionsColumnUsernameOnly": {
|
||||
|
|
@ -1150,6 +1150,10 @@
|
|||
"message": "Disable Auto-Submit",
|
||||
"description": "Site Preferences option selection."
|
||||
},
|
||||
"optionsSelectionPasskeys": {
|
||||
"message": "Disable passkeys",
|
||||
"description": "Site Preferences option selection."
|
||||
},
|
||||
"optionsSelectionFull": {
|
||||
"message": "Disable all features",
|
||||
"description": "Site Preferences option selection."
|
||||
|
|
|
|||
|
|
@ -335,14 +335,15 @@ page.fillHttpAuth = async function(tab, credentials) {
|
|||
}
|
||||
};
|
||||
|
||||
page.isSiteIgnored = async function(tab, currentLocation) {
|
||||
page.isSiteIgnored = async function(tab, args = []) {
|
||||
const [ currentLocation, checkPasskeys ] = args;
|
||||
if (!page?.settings?.sitePreferences || !currentLocation) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const site of page.settings.sitePreferences) {
|
||||
if (siteMatch(site.url, currentLocation) || site.url === currentLocation) {
|
||||
if (site.ignore === IGNORE_FULL) {
|
||||
if (site.ignore === IGNORE_FULL || (checkPasskeys && site.ignore === IGNORE_PASSKEYS)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ const EXTENSION_NAME = 'KeePassXC-Browser';
|
|||
const IGNORE_NOTHING = 'ignoreNothing';
|
||||
const IGNORE_NORMAL = 'ignoreNormal';
|
||||
const IGNORE_AUTOSUBMIT = 'ignoreAutoSubmit';
|
||||
const IGNORE_PASSKEYS = 'ignorePasskeys';
|
||||
const IGNORE_FULL = 'ignoreFull';
|
||||
|
||||
// Credential sorting options
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ const initContent = async () => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (await chrome.runtime.sendMessage({ action: 'is_site_ignored', args: window.self.location.href })) {
|
||||
if (await chrome.runtime.sendMessage({ action: 'is_site_ignored', args: [ window.self.location.href, true ] })) {
|
||||
console.log('This site is ignored in Site Preferences.');
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@
|
|||
<tr>
|
||||
<th scope="col"><span data-i18n="optionsColumnPageURL"></span></th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"><span data-i18n="optionsColumnIgnore"></span></th>
|
||||
<th scope="col"><span data-i18n="optionsColumnFeatures"></span></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -798,6 +798,7 @@
|
|||
<option value="ignoreNothing" data-i18n="optionsSelectionNothing"></option>
|
||||
<option value="ignoreNormal" data-i18n="optionsSelectionNormal"></option>
|
||||
<option value="ignoreAutoSubmit" data-i18n="optionsSelectionAutoSubmit"></option>
|
||||
<option value="ignorePasskeys" data-i18n="optionsSelectionPasskeys"></option>
|
||||
<option value="ignoreFull" data-i18n="optionsSelectionFull"></option>
|
||||
</select>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Reference in a new issue