From 287ed1715b8318547fa78bc1ce5fbb290a8b9809 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:17:13 -0400 Subject: [PATCH] Refactor - auto update credential provider script (#22077) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../Assets/CC_Script/FormAutofillSection.sys.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/firefox-ios/Client/Assets/CC_Script/FormAutofillSection.sys.mjs b/firefox-ios/Client/Assets/CC_Script/FormAutofillSection.sys.mjs index 3cfca72b78f8..e96b0c84547a 100644 --- a/firefox-ios/Client/Assets/CC_Script/FormAutofillSection.sys.mjs +++ b/firefox-ios/Client/Assets/CC_Script/FormAutofillSection.sys.mjs @@ -291,6 +291,11 @@ export class FormAutofillSection { }; for (const detail of this.fieldDetails) { + // Do not save security code. + if (detail.fieldName == "cc-csc") { + continue; + } + const { filledValue } = formFilledData.get(detail.elementId); if ( @@ -322,6 +327,12 @@ export class FormAutofillSection { */ getAutofillFields() { return this.fieldDetails.filter(fieldDetail => { + // We don't save security code, but if somehow the profile has securty code, + // make sure we don't autofill it. + if (fieldDetail.fieldName == "cc-csc") { + return false; + } + // When both visible and invisible . if (fieldDetail.localName == "select" && !fieldDetail.isVisible) {