diff --git a/CHANGELOG b/CHANGELOG index 69175e5..12e6727 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +1.0.1 (04-03-2018) +========================= +- Don't fill password fields if they already have data +- Fix custom placeholders +- Fix input type checks +- Fix custom input fields with multiple tabs + 1.0.0 (27-02-2018) ========================= - First stable release diff --git a/keepassxc-browser/background/keepass.js b/keepassxc-browser/background/keepass.js index e734ca1..74859d0 100755 --- a/keepassxc-browser/background/keepass.js +++ b/keepassxc-browser/background/keepass.js @@ -11,7 +11,7 @@ keepass.isDatabaseClosed = false; keepass.isKeePassXCAvailable = false; keepass.isEncryptionKeyUnrecognized = false; keepass.currentKeePassXC = {'version': 0, 'versionParsed': 0}; -keepass.requiredKeePassXC = 220; +keepass.requiredKeePassXC = 230; keepass.nativeHostName = 'org.keepassxc.keepassxc_browser'; keepass.nativePort = null; keepass.keySize = 24; diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index 2e0e208..88c7064 100755 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -148,7 +148,7 @@ cipAutocomplete.onBlur = function() { else { const fieldId = cipFields.prepareId(jQuery(this).attr('data-cip-id')); const fields = cipFields.getCombination('username', fieldId); - if (_f(fields.password) && _f(fields.password).data('unchanged') !== true && jQuery(this).val() !== '') { + if (_f(fields.password) && _f(fields.password).data('unchanged') !== true && jQuery(this).val() !== '' && _detectedFields > 1) { cip.fillInCredentials(fields, true, true); } } @@ -1446,7 +1446,7 @@ cip.fillInFromActiveElement = function(suppressWarnings, passOnly = false) { cipFields.setUniqueId(jQuery(el)); const fieldId = cipFields.prepareId(jQuery(el).attr('data-cip-id')); let combination = null; - if ($(el).toType === 'password') { + if ($(el).attr('type') === 'password') { combination = cipFields.getCombination('password', fieldId); } else { @@ -1504,15 +1504,16 @@ cip.setValue = function(field, value) { } }; -cip.fillInStringFields = function(fields, StringFields, filledInFields) { +cip.fillInStringFields = function(fields, stringFields, filledInFields) { let $filledIn = false; filledInFields.list = []; - if (fields && StringFields && fields.length > 0 && StringFields.length > 0) { + if (fields && stringFields && fields.length > 0 && stringFields.length > 0) { for (let i = 0; i < fields.length; i++) { const $sf = _fs(fields[i]); - if ($sf && StringFields[i]) { - cip.setValue($sf, StringFields[i].Value); + const stringFieldValue = Object.values(stringFields[i]); + if ($sf && stringFieldValue[0]) { + cip.setValue($sf, stringFieldValue[0]); filledInFields.list.push(fields[i]); $filledIn = true; } @@ -1695,7 +1696,7 @@ cip.contextMenuRememberCredentials = function() { cipFields.setUniqueId(jQuery(el)); const fieldId = cipFields.prepareId(jQuery(el).attr('data-cip-id')); let combination = null; - if ($(el).toType === 'password') { + if ($(el).attr('type') === 'password') { combination = cipFields.getCombination('password', fieldId); } else { diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json index ee7c688..0838780 100755 --- a/keepassxc-browser/manifest.json +++ b/keepassxc-browser/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, "name": "KeePassXC-Browser", - "version": "1.0.0", - "version_name": "1.0.0", + "version": "1.0.1", + "version_name": "1.0.1", "description": "KeePassXC integration for modern web browsers", "author": "KeePassXC Team", "icons": { @@ -104,7 +104,7 @@ "applications": { "gecko": { "id": "keepassxc-browser@keepassxc.org", - "strict_min_version": "55.0" + "strict_min_version": "52.0" } } } diff --git a/keepassxc-browser/popups/popup_functions.js b/keepassxc-browser/popups/popup_functions.js index f78182c..206938b 100644 --- a/keepassxc-browser/popups/popup_functions.js +++ b/keepassxc-browser/popups/popup_functions.js @@ -15,11 +15,16 @@ function initSettings() { }); $('#settings #btn-choose-credential-fields').click(function() { - browser.runtime.getBackgroundPage().then((global) => { - browser.tabs.sendMessage(global.page.currentTabId, { - action: 'choose_credential_fields' + browser.windows.getCurrent().then((win) => { + browser.tabs.query({ 'active': true, 'currentWindow': true }).then((tabs) => { + const tab = tabs[0]; + browser.runtime.getBackgroundPage().then((global) => { + browser.tabs.sendMessage(tab.id, { + action: 'choose_credential_fields' + }); + close(); + }); }); - close(); }); }); }