Skip to content

Commit

Permalink
Refactor - auto update credential provider script (#22077)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Sep 19, 2024
1 parent 8ee8763 commit 287ed17
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions firefox-ios/Client/Assets/CC_Script/FormAutofillSection.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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 <select> elements exist, we only autofill the
// visible <select>.
if (fieldDetail.localName == "select" && !fieldDetail.isVisible) {
Expand Down

0 comments on commit 287ed17

Please sign in to comment.