From 2888ecdb500311d3ca7e6c867bda23212e83989f Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Wed, 13 Sep 2023 05:42:02 +0000 Subject: [PATCH] Test --- .github/workflows/dependency-review.yml | 3 ++- assets/login.min.js.map | 2 +- assets/profile.min.js.map | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 45b9ee9d..bb8ac1c7 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,7 +17,8 @@ jobs: - name: Harden Runner uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 with: - egress-policy: block + egress-policy: audit + disable-sudo: true allowed-endpoints: > api.github.com:443 github.com:443 diff --git a/assets/login.min.js.map b/assets/login.min.js.map index 528badb4..08c528e5 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","quer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BAAoB,gCAC3BA,EAAAA,GAAG,4BAA6B,gCAC9B6E,EAAA7E,GAAC,4BAA6B,gCE0B7D,IAAM8E,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,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":["import { __ } from '@wordpress/i18n';\nexport const L_WEBAUTHN_NOT_SUPPORTED = __('WebAuthn is not supported by the browser.', 'two-factor-provider-webauthn');\nexport const L_UNABLE_TO_GET_PK_CREDENTIAL = __('Unable to get a public key credential.', 'two-factor-provider-webauthn');\nexport const L_NOT_ALLOWED_ERROR = __('The request is not allowed.', 'two-factor-provider-webauthn');\nexport const L_SECURITY_ERROR = __('The operation is insecure.', 'two-factor-provider-webauthn');\nexport const L_NOT_SUPPORTED_ERROR = __('The operation is not supported.', 'two-factor-provider-webauthn');\nexport const L_ABORT_ERROR = __('The operation was canceled.', 'two-factor-provider-webauthn');\nexport const L_UNKNOWN_KEY = __('You cannot use this key to log in.', 'two-factor-provider-webauthn');\nexport const L_KEY_ALREADY_REGISTERED = __('This key is already registered.', 'two-factor-provider-webauthn');\nexport const L_UNKNOWN_ERROR = __('This key is already registered.', 'two-factor-provider-webauthn');\nexport const L_FETCHING_REG_INFO = __('Fetching registration information…', 'two-factor-provider-webauthn');\nexport const L_GENERATING_CREDENTIALS = __('Generating credentials…', 'two-factor-provider-webauthn');\nexport const L_REGISTERING_CREDENTIALS = __('Registering credentials…', 'two-factor-provider-webauthn');\nexport const L_FAILED_TO_CREATE_CREDENTIALS = __('Unable to create public key credentials', 'two-factor-provider-webauthn');\nexport const L_KEY_REGISTERED = __('The key has been registered.', 'two-factor-provider-webauthn');\nexport const L_SENDING_REQUEST = __('Sending request…', 'two-factor-provider-webauthn');\nexport const L_KEY_REVOKED = __('The key has been revoked.', 'two-factor-provider-webauthn');\nexport const L_KEY_RENAMED = __('The key has been renamed.', 'two-factor-provider-webauthn');\n//# sourceMappingURL=lang.js.map","import { L_NOT_ALLOWED_ERROR, L_SECURITY_ERROR, L_NOT_SUPPORTED_ERROR, L_ABORT_ERROR, L_UNKNOWN_KEY, L_KEY_ALREADY_REGISTERED, } from './lang';\nfunction arrayToBase64String(a) {\n return window.btoa(String.fromCharCode(...a));\n}\nfunction base64UrlDecode(input) {\n return window.atob(input.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat(3 - ((3 + input.length) % 4)));\n}\nfunction stringToBuffer(s) {\n return Uint8Array.from(s, (c) => c.charCodeAt(0));\n}\nexport function preparePublicKeyCreationOptions(publicKey) {\n var _a;\n return {\n ...publicKey,\n user: {\n ...publicKey.user,\n id: stringToBuffer(base64UrlDecode(publicKey.user.id)),\n },\n challenge: stringToBuffer(base64UrlDecode(publicKey.challenge)),\n excludeCredentials: (_a = publicKey.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map((data) => ({\n ...data,\n id: stringToBuffer(base64UrlDecode(data.id)),\n })),\n };\n}\nexport function preparePublicKeyCredentialRequestOptions(publicKey) {\n var _a;\n return {\n ...publicKey,\n challenge: stringToBuffer(base64UrlDecode(publicKey.challenge)),\n allowCredentials: (_a = publicKey.allowCredentials) === null || _a === void 0 ? void 0 : _a.map((data) => ({\n ...data,\n id: stringToBuffer(base64UrlDecode(data.id)),\n })),\n };\n}\nexport function preparePublicKeyCredential(data) {\n const response = data.response;\n return {\n id: data.id,\n type: data.type,\n rawId: arrayToBase64String(new Uint8Array(data.rawId)),\n clientExtensionResults: data.getClientExtensionResults(),\n response: {\n attestationObject: 'attestationObject' in response\n ? arrayToBase64String(new Uint8Array(response.attestationObject))\n : undefined,\n authenticatorData: 'authenticatorData' in response\n ? arrayToBase64String(new Uint8Array(response.authenticatorData))\n : undefined,\n signature: 'signature' in response ? arrayToBase64String(new Uint8Array(response.signature)) : undefined,\n userHandle: 'userHandle' in response && response.userHandle\n ? arrayToBase64String(new Uint8Array(response.userHandle))\n : undefined,\n clientDataJSON: arrayToBase64String(new Uint8Array(data.response.clientDataJSON)),\n },\n };\n}\nexport function decodeDOMException(e, isAuth) {\n switch (e.name) {\n case 'NotAllowedError':\n return L_NOT_ALLOWED_ERROR;\n case 'SecurityError':\n return L_SECURITY_ERROR;\n case 'NotSupportedError':\n return L_NOT_SUPPORTED_ERROR;\n case 'AbortError':\n return L_ABORT_ERROR;\n case 'InvalidStateError':\n return isAuth ? L_UNKNOWN_KEY : L_KEY_ALREADY_REGISTERED;\n default:\n return e.message;\n }\n}\n//# sourceMappingURL=common.js.map","/* eslint-disable camelcase */\nimport { preparePublicKeyCredentialRequestOptions, preparePublicKeyCredential, decodeDOMException, } from './common';\nimport { L_WEBAUTHN_NOT_SUPPORTED, L_UNABLE_TO_GET_PK_CREDENTIAL } from './lang';\nfunction showError(error) {\n const el = document.getElementById('login_error');\n if (el && el.parentNode) {\n el.parentNode.removeChild(el);\n }\n const form = document.getElementById('loginform');\n if (form) {\n form.insertAdjacentHTML('beforebegin', '

' + error + '

');\n }\n}\nfunction startAuthentication() {\n const loginForm = document.getElementById('loginform');\n const publicKey = preparePublicKeyCredentialRequestOptions(tfa_webauthn.options);\n navigator.credentials.get({\n publicKey,\n })\n .then((credential) => {\n if (credential) {\n document.getElementById('webauthn_response').value = JSON.stringify(preparePublicKeyCredential(credential));\n loginForm.submit();\n }\n else {\n throw new Error(L_UNABLE_TO_GET_PK_CREDENTIAL);\n }\n })\n .catch((e) => {\n const message = e instanceof DOMException ? decodeDOMException(e, true) : e.message;\n showError(message);\n document.getElementById('webauthn-retry').removeAttribute('hidden');\n });\n}\nconst callback = () => {\n const retryButton = document.querySelector('#webauthn-retry .button');\n retryButton.addEventListener('click', (e) => {\n document.getElementById('webauthn-retry').setAttribute('hidden', 'hidden');\n startAuthentication();\n });\n if ('credentials' in navigator) {\n if (!navigator.webdriver) {\n startAuthentication();\n }\n else {\n document.getElementById('webauthn-retry').removeAttribute('hidden');\n }\n }\n else {\n showError(L_WEBAUTHN_NOT_SUPPORTED);\n }\n};\nif (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n}\nelse {\n callback();\n}\n//# sourceMappingURL=login.js.map"],"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","_a","_extends","challenge","allowCredentials","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":"iPACO,IAAMA,EAA2BC,EAAEA,GAAC,4CAA6C,gCAC3EC,EAAgCD,EAAEA,GAAC,yCAA0C,gCAC7EE,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,gCACzDO,EAA2BP,EAAEA,GAAC,kCAAmC,gCCP9E,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A"} \ No newline at end of file diff --git a/assets/profile.min.js.map b/assets/profile.min.js.map index 6d68c5fb..f5c122ff 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,qCA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AAQ1C,SAAS,eAAeV,KAAK,sBAAsBoB,MAG3E,OAFAgC,EAAQ1C,SAAS,eAAe8C,OAChC1D,EAAazC,GACNsB,EAA4B,CAClCoC,OAAQ,sBACRC,YAAaE,EACbC,QAASvB,EAAE,YAAYwB,MACvBkC,OAAAA,EACA/C,KAAMoD,IAELtC,MAAK,SAACuC,GACNnD,EAAMG,OACL,6DAA+DrD,EAAgB,cAGhFE,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,EAvCL,CAwCF,GACD"} \ No newline at end of file +{"version":3,"file":"profile.min.js","sources":["lang.ts","common.ts","profile.ts"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nexport const L_WEBAUTHN_NOT_SUPPORTED = __('WebAuthn is not supported by the browser.', 'two-factor-provider-webauthn');\nexport const L_UNABLE_TO_GET_PK_CREDENTIAL = __('Unable to get a public key credential.', 'two-factor-provider-webauthn');\nexport const L_NOT_ALLOWED_ERROR = __('The request is not allowed.', 'two-factor-provider-webauthn');\nexport const L_SECURITY_ERROR = __('The operation is insecure.', 'two-factor-provider-webauthn');\nexport const L_NOT_SUPPORTED_ERROR = __('The operation is not supported.', 'two-factor-provider-webauthn');\nexport const L_ABORT_ERROR = __('The operation was canceled.', 'two-factor-provider-webauthn');\nexport const L_UNKNOWN_KEY = __('You cannot use this key to log in.', 'two-factor-provider-webauthn');\nexport const L_KEY_ALREADY_REGISTERED = __('This key is already registered.', 'two-factor-provider-webauthn');\nexport const L_UNKNOWN_ERROR = __('This key is already registered.', 'two-factor-provider-webauthn');\nexport const L_FETCHING_REG_INFO = __('Fetching registration information…', 'two-factor-provider-webauthn');\nexport const L_GENERATING_CREDENTIALS = __('Generating credentials…', 'two-factor-provider-webauthn');\nexport const L_REGISTERING_CREDENTIALS = __('Registering credentials…', 'two-factor-provider-webauthn');\nexport const L_FAILED_TO_CREATE_CREDENTIALS = __('Unable to create public key credentials', 'two-factor-provider-webauthn');\nexport const L_KEY_REGISTERED = __('The key has been registered.', 'two-factor-provider-webauthn');\nexport const L_SENDING_REQUEST = __('Sending request…', 'two-factor-provider-webauthn');\nexport const L_KEY_REVOKED = __('The key has been revoked.', 'two-factor-provider-webauthn');\nexport const L_KEY_RENAMED = __('The key has been renamed.', 'two-factor-provider-webauthn');\n//# sourceMappingURL=lang.js.map","import { L_NOT_ALLOWED_ERROR, L_SECURITY_ERROR, L_NOT_SUPPORTED_ERROR, L_ABORT_ERROR, L_UNKNOWN_KEY, L_KEY_ALREADY_REGISTERED, } from './lang';\nfunction arrayToBase64String(a) {\n return window.btoa(String.fromCharCode(...a));\n}\nfunction base64UrlDecode(input) {\n return window.atob(input.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat(3 - ((3 + input.length) % 4)));\n}\nfunction stringToBuffer(s) {\n return Uint8Array.from(s, (c) => c.charCodeAt(0));\n}\nexport function preparePublicKeyCreationOptions(publicKey) {\n var _a;\n return {\n ...publicKey,\n user: {\n ...publicKey.user,\n id: stringToBuffer(base64UrlDecode(publicKey.user.id)),\n },\n challenge: stringToBuffer(base64UrlDecode(publicKey.challenge)),\n excludeCredentials: (_a = publicKey.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map((data) => ({\n ...data,\n id: stringToBuffer(base64UrlDecode(data.id)),\n })),\n };\n}\nexport function preparePublicKeyCredentialRequestOptions(publicKey) {\n var _a;\n return {\n ...publicKey,\n challenge: stringToBuffer(base64UrlDecode(publicKey.challenge)),\n allowCredentials: (_a = publicKey.allowCredentials) === null || _a === void 0 ? void 0 : _a.map((data) => ({\n ...data,\n id: stringToBuffer(base64UrlDecode(data.id)),\n })),\n };\n}\nexport function preparePublicKeyCredential(data) {\n const response = data.response;\n return {\n id: data.id,\n type: data.type,\n rawId: arrayToBase64String(new Uint8Array(data.rawId)),\n clientExtensionResults: data.getClientExtensionResults(),\n response: {\n attestationObject: 'attestationObject' in response\n ? arrayToBase64String(new Uint8Array(response.attestationObject))\n : undefined,\n authenticatorData: 'authenticatorData' in response\n ? arrayToBase64String(new Uint8Array(response.authenticatorData))\n : undefined,\n signature: 'signature' in response ? arrayToBase64String(new Uint8Array(response.signature)) : undefined,\n userHandle: 'userHandle' in response && response.userHandle\n ? arrayToBase64String(new Uint8Array(response.userHandle))\n : undefined,\n clientDataJSON: arrayToBase64String(new Uint8Array(data.response.clientDataJSON)),\n },\n };\n}\nexport function decodeDOMException(e, isAuth) {\n switch (e.name) {\n case 'NotAllowedError':\n return L_NOT_ALLOWED_ERROR;\n case 'SecurityError':\n return L_SECURITY_ERROR;\n case 'NotSupportedError':\n return L_NOT_SUPPORTED_ERROR;\n case 'AbortError':\n return L_ABORT_ERROR;\n case 'InvalidStateError':\n return isAuth ? L_UNKNOWN_KEY : L_KEY_ALREADY_REGISTERED;\n default:\n return e.message;\n }\n}\n//# sourceMappingURL=common.js.map","/* eslint-disable camelcase */\n// eslint-disable-next-line import/no-unresolved -- we use jQuery from WordPress\nimport jQuery from 'jquery';\nimport { preparePublicKeyCreationOptions, preparePublicKeyCredential, decodeDOMException, } from './common';\nimport { 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, } from './lang';\nfunction ajaxRequest(data) {\n return new Promise((resolve, reject) => {\n jQuery\n .ajax({\n method: 'POST',\n url: ajaxurl,\n data,\n })\n .done((response) => {\n resolve(response);\n })\n .fail((response) => {\n let message;\n if (response.responseJSON) {\n message = response.responseJSON.data || L_UNKNOWN_ERROR;\n }\n else {\n message = response.statusText;\n }\n reject(new Error(message));\n });\n });\n}\njQuery(($) => {\n const parent = $('#webauthn-security-keys-section');\n function updateStatus(status) {\n if (!status) {\n parent.find('.security-key-status').text('');\n }\n else {\n parent\n .find('.security-key-status')\n .html('

' + status + '

');\n }\n }\n function errorHandler(e) {\n const message = e instanceof DOMException ? decodeDOMException(e, false) : e.message;\n const table = parent.find('.registered-keys');\n table.siblings('.notice').remove();\n table.before('

' + message + '

');\n }\n function startRegistration() {\n parent.find('.registered-keys').prev('.notice').remove();\n updateStatus(L_FETCHING_REG_INFO);\n ajaxRequest({\n action: 'webauthn_preregister',\n _ajax_nonce: tfa_webauthn.nonce,\n user_id: $('#user_id').val(),\n })\n .then((response) => {\n updateStatus(L_GENERATING_CREDENTIALS);\n tfa_webauthn.nonce = response.data.nonce;\n const publicKey = preparePublicKeyCreationOptions(response.data.options);\n return navigator.credentials.create({\n publicKey,\n });\n })\n .then((c) => {\n if (c) {\n updateStatus(L_REGISTERING_CREDENTIALS);\n const name = $('#webauthn-key-name').val();\n return ajaxRequest({\n action: 'webauthn_register',\n _ajax_nonce: tfa_webauthn.nonce,\n credential: JSON.stringify(preparePublicKeyCredential(c)),\n user_id: $('#user_id').val(),\n name,\n });\n }\n throw new Error(L_FAILED_TO_CREATE_CREDENTIALS);\n })\n .then((response) => {\n tfa_webauthn.nonce = response.data.nonce;\n const table = parent.find('.registered-keys');\n table.find('tbody > tr:last-child').after(response.data.row);\n table.find('tbody > tr.no-items').remove();\n table.before('

' + L_KEY_REGISTERED + '

');\n })\n .catch(errorHandler)\n .finally(() => {\n updateStatus('');\n $('#webauthn-key-name').val('');\n });\n }\n parent.find('.add-webauthn-key button').on('click', startRegistration);\n parent.find('.registered-keys').on('click', 'tbody .delete a', (e) => {\n parent.find('.registered-keys').prev('.notice').remove();\n e.preventDefault();\n const a = $(e.target);\n const actions = a.closest('.row-actions');\n if (actions.siblings('.confirm-revoke').length) {\n return;\n }\n const handle = a.data('handle');\n const nonce = a.data('nonce');\n const table = parent.find('.registered-keys');\n const tpl = $($('#webauthn-revoke-confirm').text());\n actions.after(tpl);\n actions\n .siblings('.confirm-revoke')\n .on('click', '.button-secondary', () => {\n actions.siblings('.confirm-revoke').remove();\n })\n .on('click', '.button-link-delete', () => {\n actions.siblings('.confirm-revoke').hide();\n updateStatus(L_SENDING_REQUEST);\n return ajaxRequest({\n action: 'webauthn_delete_key',\n _ajax_nonce: nonce,\n user_id: $('#user_id').val(),\n handle,\n })\n .then(() => {\n table.before('

' + L_KEY_REVOKED + '

');\n a.closest('tr').remove();\n if (!table.find('tbody > tr').length) {\n table.find('tbody').append($('#webauthn-no-keys').text());\n }\n })\n .catch(errorHandler)\n .finally(() => {\n updateStatus('');\n actions.siblings('.confirm-revoke').remove();\n });\n });\n });\n parent.find('.registered-keys').on('click', 'tbody .rename a', (e) => {\n parent.find('.registered-keys').prev('.notice').remove();\n e.preventDefault();\n const a = $(e.target);\n const actions = a.closest('.row-actions');\n if (actions.siblings('.rename-key').length) {\n return;\n }\n const handle = a.data('handle');\n const nonce = a.data('nonce');\n const name = a.closest('td').find('span.key-name').text().trim();\n const table = parent.find('.registered-keys');\n const tpl = $($('#webauthn-rename-key').text());\n actions.after(tpl);\n actions\n .siblings('.rename-key')\n .on('click', '.button-secondary', () => {\n actions.siblings('.rename-key').remove();\n })\n .on('click', '.button-primary', () => {\n const keyname = actions.siblings('.rename-key').find('input[type=\"text\"]').val();\n actions.siblings('.rename-key').hide();\n updateStatus(L_SENDING_REQUEST);\n return ajaxRequest({\n action: 'webauthn_rename_key',\n _ajax_nonce: nonce,\n user_id: $('#user_id').val(),\n handle,\n name: keyname,\n })\n .then((r) => {\n table.before('

' + L_KEY_RENAMED + '

');\n a.closest('td').find('span.key-name').text(r.data.name);\n })\n .catch(errorHandler)\n .finally(() => {\n updateStatus('');\n actions.siblings('.rename-key').remove();\n });\n })\n .find('input[type=\"text\"]')\n .val(name);\n });\n});\n//# sourceMappingURL=profile.js.map"],"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","_a","_extends","user","id","challenge","excludeCredentials","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":"mPACwCA,EAAAA,GAAG,4CAA6C,gCAC3CA,EAAAA,GAAG,yCAA0C,gCACnF,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,GAAC,0CAA2C,gCAC/EY,EAAmBZ,EAAEA,GAAC,+BAAgC,gCACtDa,EAAoBb,EAAEA,G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