diff --git a/src/background.js b/src/background.js index 70031c5a..851ed3d1 100644 --- a/src/background.js +++ b/src/background.js @@ -743,7 +743,7 @@ async function handleMessage(settings, message, sendResponse) { } break; case "copyOTP": - if (settings.enableOTP) { + if (getSetting("enableOTP", message.login, settings)) { try { if (!message.login.fields.otp) { throw new Exception("No OTP seed available"); @@ -815,7 +815,7 @@ async function handleMessage(settings, message, sendResponse) { // copy OTP token after fill if ( - settings.enableOTP && + getSetting("enableOTP", message.login, settings) && typeof message.login !== "undefined" && message.login.fields.hasOwnProperty("otp") ) { @@ -982,7 +982,7 @@ async function parseFields(settings, login) { } // preprocess otp - if (settings.enableOTP && login.fields.hasOwnProperty("otp")) { + if (getSetting("enableOTP", login, settings) && login.fields.hasOwnProperty("otp")) { if (login.fields.otp.match(/^otpauth:\/\/.+/i)) { // attempt to parse otp data as URI try { diff --git a/src/popup/detailsInterface.js b/src/popup/detailsInterface.js index 7c0a4507..0bed2af7 100644 --- a/src/popup/detailsInterface.js +++ b/src/popup/detailsInterface.js @@ -103,7 +103,7 @@ function view(ctl, params) { ]), (() => { if ( - this.settings.enableOTP && + (this.settings.enableOTP || login.store.settings.enableOTP) && login.fields.otp && login.fields.otp.params.type === "totp" ) {