From 173e1e745b1f49f6314bf0923d68d76c02d4f1dc Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:28:43 +0300 Subject: [PATCH 1/7] docs: update changelog --- readme.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index d9e6eac0..8a11cc1b 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU Tags: 2fa, webauthn, two factor, login, security, authentication Requires at least: 5.5 Tested up to: 6.2.0 -Stable tag: 2.1.0 +Stable tag: 2.2.0 Requires PHP: 7.4 License: MIT License URI: https://opensource.org/licenses/MIT @@ -33,6 +33,12 @@ Be the first to ask. == Changelog == += 2.2.0 = +* Do not create user handles if they are not needed +* Add a hook to customize WebAuthN server +* Update dependencies +* Refactor tests + = 2.1.0 = * GH-462: Use correct user ID when editing a user * GH-456: Set relying party ID to COOKIE_DOMAIN if it is available (props dd32) From 4b60f76cd5d8b62eb97b75d1cf8c320d5b26a687 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:30:17 +0300 Subject: [PATCH 2/7] chore: bump version in package.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 617d7ec6..81240af3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "two-factor-provider-webauthn", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "two-factor-provider-webauthn", - "version": "2.1.0", + "version": "2.2.0", "license": "MIT", "devDependencies": { "@babel/preset-env": "^7.16.11", diff --git a/package.json b/package.json index 37658057..ff42ebd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "two-factor-provider-webauthn", - "version": "2.1.0", + "version": "2.2.0", "private": true, "description": "", "scripts": { From 67f12306fc7439d403449a7e0d54c39f895a4d1e Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:33:01 +0300 Subject: [PATCH 3/7] chore: lock file maintenance --- composer.lock | 2 +- package-lock.json | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index f23bce31..756f60c5 100644 --- a/composer.lock +++ b/composer.lock @@ -6082,5 +6082,5 @@ "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/package-lock.json b/package-lock.json index 81240af3..4fa135d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3508,9 +3508,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001614", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", - "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", + "version": "1.0.30001616", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz", + "integrity": "sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==", "dev": true, "funding": [ { @@ -3797,9 +3797,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.752", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.752.tgz", - "integrity": "sha512-P3QJreYI/AUTcfBVrC4zy9KvnZWekViThgQMX/VpJ+IsOBbcX5JFpORM4qWapwWQ+agb2nYAOyn/4PMXOk0m2Q==", + "version": "1.4.756", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.756.tgz", + "integrity": "sha512-RJKZ9+vEBMeiPAvKNWyZjuYyUqMndcP1f335oHqn3BEQbs2NFtVrnK5+6Xg5wSM9TknNNpWghGDUCKGYF+xWXw==", "dev": true }, "node_modules/emoji-regex": { @@ -7514,9 +7514,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", + "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", "dev": true, "funding": [ { @@ -7533,7 +7533,7 @@ } ], "dependencies": { - "escalade": "^3.1.1", + "escalade": "^3.1.2", "picocolors": "^1.0.0" }, "bin": { From 6ed47b1e79f203e2b2c9a23a3e71aa395040a00f Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:33:20 +0300 Subject: [PATCH 4/7] chore: update "Tested up to" --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 8a11cc1b..587c9caf 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: volodymyrkolesnykov Donate link: https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU Tags: 2fa, webauthn, two factor, login, security, authentication Requires at least: 5.5 -Tested up to: 6.2.0 +Tested up to: 6.5 Stable tag: 2.2.0 Requires PHP: 7.4 License: MIT From c04e36a92f89c88e7dc6901f087bb08eb1827160 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:33:45 +0300 Subject: [PATCH 5/7] chore: regenerate JS files --- assets/login.min.js | 2 +- assets/login.min.js.map | 2 +- assets/profile.min.js | 2 +- assets/profile.min.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/login.min.js b/assets/login.min.js index 24a3747f..16808b88 100644 --- a/assets/login.min.js +++ b/assets/login.min.js @@ -1 +1 @@ -!function(e){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t

'+e+"

")}function p(){var e=document.getElementById("loginform"),r=function(e){var r;return t({},e,{challenge:w(l(e.challenge)),allowCredentials:null===(r=e.allowCredentials)||void 0===r?void 0:r.map((function(e){return t({},e,{id:w(l(e.id))})}))})}(tfa_webauthn.options);navigator.credentials.get({publicKey:r}).then((function(t){if(!t)throw new Error(n);var r,o;document.getElementById("webauthn_response").value=JSON.stringify((o=(r=t).response,{id:r.id,type:r.type,rawId:s(new Uint8Array(r.rawId)),clientExtensionResults:r.getClientExtensionResults(),response:{attestationObject:"attestationObject"in o?s(new Uint8Array(o.attestationObject)):void 0,authenticatorData:"authenticatorData"in o?s(new Uint8Array(o.authenticatorData)):void 0,signature:"signature"in o?s(new Uint8Array(o.signature)):void 0,userHandle:"userHandle"in o&&o.userHandle?s(new Uint8Array(o.userHandle)):void 0,clientDataJSON:s(new Uint8Array(r.response.clientDataJSON))}})),e.submit()})).catch((function(e){h(e instanceof DOMException?function(e,t){switch(e.name){case"NotAllowedError":return o;case"SecurityError":return a;case"NotSupportedError":return i;case"AbortError":return d;case"InvalidStateError":return t?u:c;default:return e.message}}(e,!0):e.message),document.getElementById("webauthn-retry").removeAttribute("hidden")}))}e.__("This key is already registered.","two-factor-provider-webauthn"),e.__("Fetching registration information…","two-factor-provider-webauthn"),e.__("Generating credentials…","two-factor-provider-webauthn"),e.__("Registering credentials…","two-factor-provider-webauthn"),e.__("Unable to create public key credentials","two-factor-provider-webauthn"),e.__("The key has been registered.","two-factor-provider-webauthn"),e.__("Sending request…","two-factor-provider-webauthn"),e.__("The key has been revoked.","two-factor-provider-webauthn"),e.__("The key has been renamed.","two-factor-provider-webauthn");var b=function(){document.querySelector("#webauthn-retry .button").addEventListener("click",(function(e){document.getElementById("webauthn-retry").setAttribute("hidden","hidden"),p()})),"credentials"in navigator?navigator.webdriver?document.getElementById("webauthn-retry").removeAttribute("hidden"):p():h(r)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",b):b()}(wp.i18n); +!function(e){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t

'+e+"

")}function h(){var e=document.getElementById("loginform"),r=function(e){var r;return t({},e,{challenge:l(s(e.challenge)),allowCredentials:null===(r=e.allowCredentials)||void 0===r?void 0:r.map((function(e){return t({},e,{id:l(s(e.id))})}))})}(tfa_webauthn.options);navigator.credentials.get({publicKey:r}).then((function(t){if(!t)throw new Error(n);var r,o;document.getElementById("webauthn_response").value=JSON.stringify((o=(r=t).response,{id:r.id,type:r.type,rawId:c(new Uint8Array(r.rawId)),clientExtensionResults:r.getClientExtensionResults(),response:{attestationObject:"attestationObject"in o?c(new Uint8Array(o.attestationObject)):void 0,authenticatorData:"authenticatorData"in o?c(new Uint8Array(o.authenticatorData)):void 0,signature:"signature"in o?c(new Uint8Array(o.signature)):void 0,userHandle:"userHandle"in o&&o.userHandle?c(new Uint8Array(o.userHandle)):void 0,clientDataJSON:c(new Uint8Array(r.response.clientDataJSON))}})),e.submit()})).catch((function(e){w(e instanceof DOMException?function(e,t){switch(e.name){case"NotAllowedError":return o;case"SecurityError":return a;case"NotSupportedError":return i;case"AbortError":return d;case"InvalidStateError":return u;default:return e.message}}(e):e.message),document.getElementById("webauthn-retry").removeAttribute("hidden")}))}e.__("This key is already registered.","two-factor-provider-webauthn"),e.__("This key is already registered.","two-factor-provider-webauthn"),e.__("Fetching registration information…","two-factor-provider-webauthn"),e.__("Generating credentials…","two-factor-provider-webauthn"),e.__("Registering credentials…","two-factor-provider-webauthn"),e.__("Unable to create public key credentials","two-factor-provider-webauthn"),e.__("The key has been registered.","two-factor-provider-webauthn"),e.__("Sending request…","two-factor-provider-webauthn"),e.__("The key has been revoked.","two-factor-provider-webauthn"),e.__("The key has been renamed.","two-factor-provider-webauthn");var p=function(){document.querySelector("#webauthn-retry .button").addEventListener("click",(function(e){document.getElementById("webauthn-retry").setAttribute("hidden","hidden"),h()})),"credentials"in navigator?navigator.webdriver?document.getElementById("webauthn-retry").removeAttribute("hidden"):h():w(r)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()}(wp.i18n); diff --git a/assets/login.min.js.map b/assets/login.min.js.map index 528badb4..210c10d3 100644 --- a/assets/login.min.js.map +++ b/assets/login.min.js.map @@ -1 +1 @@ -{"version":3,"file":"login.min.js","sources":["lang.ts","common.ts","login.ts"],"sourcesContent":[null,null,null],"names":["L_WEBAUTHN_NOT_SUPPORTED","__","L_UNABLE_TO_GET_PK_CREDENTIAL","L_NOT_ALLOWED_ERROR","L_SECURITY_ERROR","L_NOT_SUPPORTED_ERROR","L_ABORT_ERROR","L_UNKNOWN_KEY","L_KEY_ALREADY_REGISTERED","arrayToBase64String","a","window","btoa","String","fromCharCode","apply","base64UrlDecode","input","atob","replace","repeat","length","stringToBuffer","s","Uint8Array","from","c","charCodeAt","showError","error","el","document","getElementById","parentNode","removeChild","form","insertAdjacentHTML","startAuthentication","loginForm","publicKey","_extends","challenge","allowCredentials","_a","map","data","id","preparePublicKeyCredentialRequestOptions","tfa_webauthn","options","navigator","credentials","get","then","credential","Error","response","value","JSON","stringify","type","rawId","clientExtensionResults","getClientExtensionResults","attestationObject","undefined","authenticatorData","signature","userHandle","clientDataJSON","submit","e","DOMException","isAuth","name","message","decodeDOMException","removeAttribute","i18n","callback","querySelector","addEventListener","setAttribute","webdriver","readyState"],"mappings":"iPAEO,IAAMA,EAA2BC,EAAEA,GAAC,4CAA6C,gCAC3EC,EAAgCD,EAAEA,GAC9C,yCACA,gCAEYE,EAAsBF,EAAEA,GAAC,8BAA+B,gCACxDG,EAAmBH,EAAEA,GAAC,6BAA8B,gCACpDI,EAAwBJ,EAAEA,GAAC,kCAAmC,gCAC9DK,EAAgBL,EAAEA,GAAC,8BAA+B,gC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C,IAKDT,EAAU5B,EAEZ,EAE4B,YAAxB+B,SAASqD,WACZrD,SAASkD,iBAAiB,mBAAoBF,GAE9CA"} \ No newline at end of file +{"version":3,"file":"login.min.js","sources":["lang.ts","common.ts","login.ts"],"sourcesContent":[null,null,null],"names":["L_WEBAUTHN_NOT_SUPPORTED","__","L_UNABLE_TO_GET_PK_CREDENTIAL","L_NOT_ALLOWED_ERROR","L_SECURITY_ERROR","L_NOT_SUPPORTED_ERROR","L_ABORT_ERROR","L_UNKNOWN_KEY","arrayToBase64String","a","window","btoa","String","fromCharCode","apply","base64UrlDecode","input","atob","replace","repeat","length","stringToBuffer","s","Uint8Array","from","c","charCodeAt","showError","error","el","document","getElementById","parentNode","removeChild","form","insertAdjacentHTML","startAuthentication","loginForm","publicKey","_extends","challenge","allowCredentials","_a","map","data","id","preparePublicKeyCredentialRequestOptions","tfa_webauthn","options","navigator","credentials","get","then","credential","Error","response","value","JSON","stringify","type","rawId","clientExtensionResults","getClientExtensionResults","attestationObject","undefined","authenticatorData","signature","userHandle","clientDataJSON","submit","e","DOMException","isAuth","name","message","decodeDOMException","removeAttribute","i18n","callback","querySelector","addEventListener","setAttribute","webdriver","readyState"],"mappings":"iPAEO,IAAMA,EAA2BC,EAAEA,GAAC,4CAA6C,gCAC3EC,EAAgCD,EAAEA,GAC9C,yCACA,gCAEYE,EAAsBF,EAAEA,GAAC,8BAA+B,gCACxDG,EAAmBH,EAAEA,GAAC,6BAA8B,gCACpDI,EAAwBJ,EAAEA,GAAC,kCAAmC,gCAC9DK,EAAgBL,EAAEA,GAAC,8BAA+B,gCAClDM,EAAgBN,EAAEA,GAAC,qCAAsC,gCC6BtE,SAASO,EAAoBC,GAC5B,OAAOC,OAAOC,KAAKC,OAAOC,aAAYC,MAAnBF,OAAuBH,GAC3C,CAEA,SAASM,EAAgBC,GACxB,OAAON,OAAOO,KAAKD,EAAME,QAAQ,KAAM,KAAKA,QAAQ,KAAM,KAAO,IAAIC,OAAO,GAAM,EAAIH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AAWgC,EAASY,kBAC5CH,EACJI,eAAgB5D,EAAoB,IAAIe,WAAWqB,EAAKW,SAASa,qBCrEhE/B,EAAUgC,QAIZ,IAAE,OACK,SAACC,GAEP3C,EADgB2C,aAAaC,aDoEhB,SAAmBD,EAAiBE,GACnD,OAAQF,EAAEG,MACT,IAAK,kBACJ,OAAOtE,EAER,IAAK,gBACJ,OAAOC,EAER,IAAK,oBACJ,OAAOC,EAER,IAAK,aACJ,OAAOC,EAER,IAAK,oBACJ,OAAgBC,EAEjB,QACC,OAAO+D,EAAEI,QAEZ,CCxF+CC,CAAmBL,GAAWA,EAAEI,SAE3E5C,SAASC,eAAe,kBAAqC6C,gBAAgB,SAC/E,GACF,CFpCwC3E,EAAAA,GAAG,kCAAmC,gCAC/CA,EAAAA,GAAG,kCAAmC,gCAClCA,EAAAA,GAAG,qCAAsC,gCACpCA,EAAAA,GAAG,0BAA2B,gCAC7BA,EAAAA,GAAG,2BAA4B,gCAC1BA,EAAAA,GAC7C,0CACA,gCAE+BA,EAAAA,GAAG,+BAAgC,gCAClCA,EAAAA,GAAG,mBAAoB,gCAC3BA,EAAAA,GAAG,4BAA6B,gCAC9B4E,EAAA5E,GAAC,4BAA6B,gCE0B7D,IAAM6E,EAAW,WACIhD,SAASiD,cAAc,2BAC/BC,iBAAiB,SAAS,SAACV,GACrCxC,SAASC,eAAe,kBAAqCkD,aAAa,SAAU,UACrF7C,GACD,IAEI,gBAAiBa,UACfA,UAAUiC,UAGbpD,SAASC,eAAe,kBAAqC6C,gBAAgB,UAF9ExC,IAKDT,EAAU3B,EAEZ,EAE4B,YAAxB8B,SAASqD,WACZrD,SAASkD,iBAAiB,mBAAoBF,GAE9CA"} \ No newline at end of file diff --git a/assets/profile.min.js b/assets/profile.min.js index e51b637c..69b4024a 100644 --- a/assets/profile.min.js +++ b/assets/profile.min.js @@ -1 +1 @@ -!function(e,t){function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t

'+e+"

"):t.find(".security-key-status").text("")}function m(e){var n=e instanceof DOMException?function(e,t){switch(e.name){case"NotAllowedError":return r;case"SecurityError":return a;case"NotSupportedError":return i;case"AbortError":return o;case"InvalidStateError":return t?s:c;default:return e.message}}(e,!1):e.message,d=t.find(".registered-keys");d.siblings(".notice").remove(),d.before('")}t.find(".add-webauthn-key button").on("click",(function(){t.find(".registered-keys").prev(".notice").remove(),d(u),k({action:"webauthn_preregister",_ajax_nonce:tfa_webauthn.nonce,user_id:e("#user_id").val()}).then((function(e){d(l),tfa_webauthn.nonce=e.data.nonce;var t=function(e){var t;return n({},e,{user:n({},e.user,{id:g(_(e.user.id))}),challenge:g(_(e.challenge)),excludeCredentials:null===(t=e.excludeCredentials)||void 0===t?void 0:t.map((function(e){return n({},e,{id:g(_(e.id))})}))})}(e.data.options);return navigator.credentials.create({publicKey:t})})).then((function(t){if(t){d(f);var n=e("#webauthn-key-name").val();return k({action:"webauthn_register",_ajax_nonce:tfa_webauthn.nonce,credential:JSON.stringify((r=t,a=r.response,{id:r.id,type:r.type,rawId:y(new Uint8Array(r.rawId)),clientExtensionResults:r.getClientExtensionResults(),response:{attestationObject:"attestationObject"in a?y(new Uint8Array(a.attestationObject)):void 0,authenticatorData:"authenticatorData"in a?y(new Uint8Array(a.authenticatorData)):void 0,signature:"signature"in a?y(new Uint8Array(a.signature)):void 0,userHandle:"userHandle"in a&&a.userHandle?y(new Uint8Array(a.userHandle)):void 0,clientDataJSON:y(new Uint8Array(r.response.clientDataJSON))}})),user_id:e("#user_id").val(),name:n})}var r,a;throw new Error(h)})).then((function(e){tfa_webauthn.nonce=e.data.nonce;var n=t.find(".registered-keys");n.find("tbody > tr:last-child").after(e.data.row),n.find("tbody > tr.no-items").remove(),n.before('")})).catch(m).finally((function(){d(""),e("#webauthn-key-name").val("")}))})),t.find(".registered-keys").on("click","tbody .delete a",(function(n){t.find(".registered-keys").prev(".notice").remove(),n.preventDefault();var r=e(n.target),a=r.closest(".row-actions");if(!a.siblings(".confirm-revoke").length){var i=r.data("handle"),o=r.data("nonce"),s=t.find(".registered-keys"),c=e(e("#webauthn-revoke-confirm").text());a.after(c),a.siblings(".confirm-revoke").on("click",".button-secondary",(function(){a.siblings(".confirm-revoke").remove()})).on("click",".button-link-delete",(function(){a.siblings(".confirm-revoke").hide(),d(v),k({action:"webauthn_delete_key",_ajax_nonce:o,user_id:e("#user_id").val(),handle:i}).then((function(){s.before('"),r.closest("tr").remove(),s.find("tbody > tr").length||s.find("tbody").append(e("#webauthn-no-keys").text())})).catch(m).finally((function(){d(""),a.siblings(".confirm-revoke").remove()}))}))}})),t.find(".registered-keys").on("click","tbody .rename a",(function(n){t.find(".registered-keys").prev(".notice").remove(),n.preventDefault();var r=e(n.target),a=r.closest(".row-actions");if(!a.siblings(".rename-key").length){var i=r.data("handle"),o=r.data("nonce"),s=r.closest("td").find("span.key-name").text().trim(),c=t.find(".registered-keys"),u=e(e("#webauthn-rename-key").text());a.after(u),a.siblings(".rename-key").on("click",".button-secondary",(function(){a.siblings(".rename-key").remove()})).on("click",".button-primary",(function(){var t=a.siblings(".rename-key").find('input[type="text"]').val();a.siblings(".rename-key").hide(),d(v),k({action:"webauthn_rename_key",_ajax_nonce:o,user_id:e("#user_id").val(),handle:i,name:t}).then((function(e){c.before('"),r.closest("td").find("span.key-name").text(e.data.name)})).catch(m).finally((function(){d(""),a.siblings(".rename-key").remove()}))})).find('input[type="text"]').val(s)}}))}))}(jQuery,wp.i18n); +!function(e,t){function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t

'+e+"

"):t.find(".security-key-status").text("")}function k(e){var n=e instanceof DOMException?function(e,t){switch(e.name){case"NotAllowedError":return r;case"SecurityError":return a;case"NotSupportedError":return i;case"AbortError":return o;case"InvalidStateError":return s;default:return e.message}}(e):e.message,c=t.find(".registered-keys");c.siblings(".notice").remove(),c.before('")}t.find(".add-webauthn-key button").on("click",(function(){t.find(".registered-keys").prev(".notice").remove(),c(d),g({action:"webauthn_preregister",_ajax_nonce:tfa_webauthn.nonce,user_id:e("#user_id").val()}).then((function(e){c(u),tfa_webauthn.nonce=e.data.nonce;var t=function(e){var t;return n({},e,{user:n({},e.user,{id:_(y(e.user.id))}),challenge:_(y(e.challenge)),excludeCredentials:null===(t=e.excludeCredentials)||void 0===t?void 0:t.map((function(e){return n({},e,{id:_(y(e.id))})}))})}(e.data.options);return navigator.credentials.create({publicKey:t})})).then((function(t){if(t){c(l);var n=e("#webauthn-key-name").val();return g({action:"webauthn_register",_ajax_nonce:tfa_webauthn.nonce,credential:JSON.stringify((r=t,a=r.response,{id:r.id,type:r.type,rawId:p(new Uint8Array(r.rawId)),clientExtensionResults:r.getClientExtensionResults(),response:{attestationObject:"attestationObject"in a?p(new Uint8Array(a.attestationObject)):void 0,authenticatorData:"authenticatorData"in a?p(new Uint8Array(a.authenticatorData)):void 0,signature:"signature"in a?p(new Uint8Array(a.signature)):void 0,userHandle:"userHandle"in a&&a.userHandle?p(new Uint8Array(a.userHandle)):void 0,clientDataJSON:p(new Uint8Array(r.response.clientDataJSON))}})),user_id:e("#user_id").val(),name:n})}var r,a;throw new Error(f)})).then((function(e){tfa_webauthn.nonce=e.data.nonce;var n=t.find(".registered-keys");n.find("tbody > tr:last-child").after(e.data.row),n.find("tbody > tr.no-items").remove(),n.before('")})).catch(k).finally((function(){c(""),e("#webauthn-key-name").val("")}))})),t.find(".registered-keys").on("click","tbody .delete a",(function(n){t.find(".registered-keys").prev(".notice").remove(),n.preventDefault();var r=e(n.target),a=r.closest(".row-actions");if(!a.siblings(".confirm-revoke").length){var i=r.data("handle"),o=r.data("nonce"),s=t.find(".registered-keys"),d=e(e("#webauthn-revoke-confirm").text());a.after(d),a.siblings(".confirm-revoke").on("click",".button-secondary",(function(){a.siblings(".confirm-revoke").remove()})).on("click",".button-link-delete",(function(){a.siblings(".confirm-revoke").hide(),c(b),g({action:"webauthn_delete_key",_ajax_nonce:o,user_id:e("#user_id").val(),handle:i}).then((function(){s.before('"),r.closest("tr").remove(),s.find("tbody > tr").length||s.find("tbody").append(e("#webauthn-no-keys").text())})).catch(k).finally((function(){c(""),a.siblings(".confirm-revoke").remove()}))}))}})),t.find(".registered-keys").on("click","tbody .rename a",(function(n){t.find(".registered-keys").prev(".notice").remove(),n.preventDefault();var r=e(n.target),a=r.closest(".row-actions");if(!a.siblings(".rename-key").length){var i=r.data("handle"),o=r.data("nonce"),s=r.closest("td").find("span.key-name").text().trim(),d=t.find(".registered-keys"),u=e(e("#webauthn-rename-key").text());a.after(u),a.siblings(".rename-key").on("click",".button-secondary",(function(){a.siblings(".rename-key").remove()})).on("click",".button-primary",(function(){var t=a.siblings(".rename-key").find('input[type="text"]').val();a.siblings(".rename-key").hide(),c(b),g({action:"webauthn_rename_key",_ajax_nonce:o,user_id:e("#user_id").val(),handle:i,name:t}).then((function(e){d.before('"),r.closest("td").find("span.key-name").text(e.data.name)})).catch(k).finally((function(){c(""),a.siblings(".rename-key").remove()}))})).find('input[type="text"]').val(s)}}))}))}(jQuery,wp.i18n); diff --git a/assets/profile.min.js.map b/assets/profile.min.js.map index 28729542..585812d1 100644 --- a/assets/profile.min.js.map +++ b/assets/profile.min.js.map @@ -1 +1 @@ -{"version":3,"file":"profile.min.js","sources":["lang.ts","common.ts","profile.ts"],"sourcesContent":[null,null,null],"names":["__","L_NOT_ALLOWED_ERROR","L_SECURITY_ERROR","L_NOT_SUPPORTED_ERROR","L_ABORT_ERROR","L_UNKNOWN_KEY","L_KEY_ALREADY_REGISTERED","L_UNKNOWN_ERROR","L_FETCHING_REG_INFO","L_GENERATING_CREDENTIALS","L_REGISTERING_CREDENTIALS","L_FAILED_TO_CREATE_CREDENTIALS","L_KEY_REGISTERED","L_SENDING_REQUEST","L_KEY_REVOKED","L_KEY_RENAMED","arrayToBase64String","a","window","btoa","String","fromCharCode","apply","base64UrlDecode","input","atob","replace","repeat","length","stringToBuffer","s","Uint8Array","from","c","charCodeAt","ajaxRequest","data","Promise","resolve","reject","jQuery","ajax","method","url","ajaxurl","done","response","fail","message","responseJSON","statusText","Error","$","parent","updateStatus","status","find","html","text","errorHandler","e","DOMException","isAuth","name","decodeDOMException","table","siblings","remove","before","on","prev","action","_ajax_nonce","tfa_webauthn","nonce","user_id","val","then","publicKey","_extends","user","id","challenge","excludeCredentials","_a","map","preparePublicKeyCreationOptions","options","navigator","credentials","create","credential","JSON","stringify","type","rawId","clientExtensionResults","getClientExtensionResults","attestationObject","undefined","authenticatorData","signature","userHandle","clientDataJSON","after","row","preventDefault","target","actions","closest","handle","tpl","hide","append","trim","keyname","r"],"mappings":"mPAEwCA,EAAAA,GAAG,4CAA6C,gCAC3CA,EAAAA,GAC5C,yCACA,gCAEM,IAAMC,EAAsBD,EAAEA,GAAC,8BAA+B,gCACxDE,EAAmBF,EAAEA,GAAC,6BAA8B,gCACpDG,EAAwBH,EAAEA,GAAC,kCAAmC,gCAC9DI,EAAgBJ,EAAEA,GAAC,8BAA+B,gCAClDK,EAAgBL,EAAEA,GAAC,qCAAsC,gCACzDM,EAA2BN,EAAEA,GAAC,kCAAmC,gCACjEO,EAAkBP,EAAEA,GAAC,kCAAmC,gCACxDQ,EAAsBR,EAAEA,GAAC,qCAAsC,gCAC/DS,EAA2BT,EAAEA,GAAC,0BAA2B,gCACzDU,EAA4BV,EAAEA,GAAC,2BAA4B,gCAC3DW,EAAiCX,EAAEA,GAC/C,0CACA,gCAEYY,EAAmBZ,EAAEA,GAAC,+BAAgC,gCACtDa,EAAoBb,EAAEA,GAAC,mBAAoB,gCAC3Cc,EAAgBd,EAAEA,GAAC,4BAA6B,gCAChDe,EAAgBf,EAAAA,GAAG,4BAA6B,gCCgB7D,SAASgB,EAAoBC,GAC5B,OAAOC,OAAOC,KAAKC,OAAOC,aAAYC,MAAnBF,OAAuBH,GAC3C,CAEA,SAASM,EAAgBC,GACxB,OAAON,OAAOO,KAAKD,EAAME,QAAQ,KAAM,KAAKA,QAAQ,KAAM,KAAO,IAAIC,OAAO,GAAM,EAAIH,EAAMI,QAAU,GACvG,CAEA,SAASC,EAAeC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oBa,GAAG,QAAS,mBAAmB,SAACT,GAC/DP,EAAOG,KAAK,oBAAoBc,KAAK,WAAWH,SAChDP,EAAE8C,iBACF,IAAMzF,EAAImC,EAAEQ,EAAE+C,QACRC,EAAU3F,EAAE4F,QAAQ,gBAC1B,IAAID,EAAQ1C,SAAS,eAAetC,OAApC,CAIA,IAAMkF,EAAiB7F,EAAEmB,KAAK,UACxBsC,EAAgBzD,EAAEmB,KAAK,SACvB2B,EAAO9C,EAAE4F,QAAQ,MAAMrD,KAAK,iBAAiBE,OAAOwD,OACpDjD,EAAQZ,EAAOG,KAAK,oBAEpBuD,EAAM3D,EAAEA,EAAE,wBAAwBM,QACxCkD,EAAQJ,MAAMO,GACdH,EACE1C,SAAS,eACTG,GAAG,QAAS,qBAAqB,WACjCuC,EAAQ1C,SAAS,eAAeC,QAChC,IACAE,GAAG,QAAS,mBAAmB,WAC/B,IAAM8C,EAAUP,EAAQ1C,SAAS,eAAeV,KAAK,sBAAsBoB,MAC3EgC,EAAQ1C,SAAS,eAAe8C,OAChC1D,EAAazC,GACbsB,EAA4B,CAC3BoC,OAAQ,sBACRC,YAAaE,EACbC,QAASvB,EAAE,YAAYwB,MACvBkC,OAAAA,EACA/C,KAAMoD,IAELtC,MAAK,SAACuC,GACNnD,EAAMG,OACL,gFACCrD,EACA,cAGFE,EAAE4F,QAAQ,MAAMrD,KAAK,iBAAiBE,KAAK0D,EAAEhF,KAAK2B,KAClD,IACK,MAACJ,GAAa,SACX,WACRL,EAAa,IACbsD,EAAQ1C,SAAS,eAAeC,QACjC,GACD,IACAX,KAAK,sBACLoB,IAAIb,EAzCN,CA0CD,GACD"} \ No newline at end of file +{"version":3,"file":"profile.min.js","sources":["lang.ts","common.ts","profile.ts"],"sourcesContent":[null,null,null],"names":["__","L_NOT_ALLOWED_ERROR","L_SECURITY_ERROR","L_NOT_SUPPORTED_ERROR","L_ABORT_ERROR","L_KEY_ALREADY_REGISTERED","L_UNKNOWN_ERROR","L_FETCHING_REG_INFO","L_GENERATING_CREDENTIALS","L_REGISTERING_CREDENTIALS","L_FAILED_TO_CREATE_CREDENTIALS","L_KEY_REGISTERED","L_SENDING_REQUEST","L_KEY_REVOKED","L_KEY_RENAMED","arrayToBase64String","a","window","btoa","String","fromCharCode","apply","base64UrlDecode","input","atob","replace","repeat","length","stringToBuffer","s","Uint8Array","from","c","charCodeAt","ajaxRequest","data","Promise","resolve","reject","jQuery","ajax","method","url","ajaxurl","done","response","fail","message","responseJSON","statusText","Error","$","parent","updateStatus","status","find","html","text","errorHandler","e","DOMException","isAuth","name","decodeDOMException","table","siblings","remove","before","on","prev","action","_ajax_nonce","tfa_webauthn","nonce","user_id","val","then","publicKey","_extends","user","id","challenge","excludeCredentials","_a","map","preparePublicKeyCreationOptions","options","navigator","credentials","create","credential","JSON","stringify","type","rawId","clientExtensionResults","getClientExtensionResults","attestationObject","undefined","authenticatorData","signature","userHandle","clientDataJSON","after","row","preventDefault","target","actions","closest","handle","tpl","hide","append","trim","keyname","r"],"mappings":"mPAEwCA,EAAAA,GAAG,4CAA6C,gCAC3CA,EAAAA,GAC5C,yCACA,gCAEM,IAAMC,EAAsBD,EAAEA,GAAC,8BAA+B,gCACxDE,EAAmBF,EAAEA,GAAC,6BAA8B,gCACpDG,EAAwBH,EAAEA,GAAC,kCAAmC,gCAC9DI,EAAgBJ,EAAEA,GAAC,8BAA+B,gCAClCA,EAAAA,GAAG,qCAAsC,gCAC/D,IAAMK,EAA2BL,EAAEA,GAAC,kCAAmC,gCACjEM,EAAkBN,EAAEA,GAAC,kCAAmC,gCACxDO,EAAsBP,EAAEA,GAAC,qCAAsC,gCAC/DQ,EAA2BR,EAAEA,GAAC,0BAA2B,gCACzDS,EAA4BT,EAAEA,GAAC,2BAA4B,gCAC3DU,EAAiCV,EAAEA,GAC/C,0CACA,gCAEYW,EAAmBX,EAAEA,GAAC,+BAAgC,gCACtDY,EAAoBZ,EAAEA,GAAC,mBAAoB,gCAC3Ca,EAAgBb,EAAEA,GAAC,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QACjC,GACD,IACAX,KAAK,sBACLoB,IAAIb,EAzCN,CA0CD,GACD"} \ No newline at end of file From 6eb8497e76c869aa87abb18e2d2bfd2c49d8d905 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:35:44 +0300 Subject: [PATCH 6/7] fix: use `require` to load `ClassLoader` --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 9f5485eb..806ead42 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,7 @@ if ( defined( 'ABSPATH' ) ) { /** @var ClassLoader */ - $loader = require_once __DIR__ . '/vendor/autoload.php'; + $loader = require __DIR__ . '/vendor/autoload.php'; // NOSONAR $loader->addClassMap( [ WP_List_Table::class => ABSPATH . 'wp-admin/includes/class-wp-list-table.php', ] ); From ebdbd43a7115b7402bc2f7b48bda03c74ad4850c Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sun, 5 May 2024 06:36:18 +0300 Subject: [PATCH 7/7] chore: bump plugin version --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 806ead42..8925f6f8 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ /* * Plugin Name: WebAuthn Provider for Two Factor * Description: WebAuthn Provider for Two Factor plugin. - * Version: 2.1.0 + * Version: 2.2.0 * Author: Volodymyr Kolesnykov * License: MIT * Text Domain: two-factor-provider-webauthn