Skip to content

Bug 2076154 - Store an optional CVV encrypted alongside the card number - #7631

Open
theidkamp wants to merge 1 commit into
mozilla:theidkamp/pr-7573from
theidkamp:cvv-column
Open

theidkamp wants to merge 1 commit into
mozilla:theidkamp/pr-7573from
theidkamp:cvv-column

Conversation

@theidkamp

@theidkamp theidkamp commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #7573 (base is theidkamp/pr-7573

What

https://bugzilla.mozilla.org/show_bug.cgi?id=2076154
Bug 2076154: Store an optional CVV encrypted alongside the card number, handled exactly like the number:

  • A v6 schema upgrade adds cc_cvv_enc (ALTER TABLE ... ADD COLUMN, no data rewrite - existing rows simply have no CVV; same encoding and blank-marker rules as cc_number_enc).
  • Transparent API: UpdatableCreditCardFields.cc_cvv (cleartext in, optional, defaults to none - so this is not breaking for consumers) and CreditCard.cc_cvv (decrypted out). None and an empty string both mean "no CVV".

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes (the new dictionary fields default to null)
  • Quality: This PR builds and tests run cleanly
  • Tests: roundtrip incl. encrypted-at-rest check, v5->v6 upgrade, and sync-update-preserves-CVV
  • Changelog: entry included
  • Dependencies: no new dependencies

A v6 schema upgrade adds the cc_cvv_enc column; the field is transparent
like the number - cleartext cc_cvv in, decrypted cc_cvv out, optional in
both directions. It syncs as a new optional cc-cvv payload field; records
written by older clients round-trip it through the mirror's unknown-fields
handling, so their edits do not drop it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant