Commit Graph

47 Commits

Author SHA1 Message Date
Jared Wein
8382062c25 Bug 1499869 - Allow displaying of masked credit card numbers when they're invalid. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9048
2018-11-13 17:35:29 +00:00
Matthew Noorenberghe
3145d7de7c Bug 1486954 - Part IV, Recover from decryption errors in some places. r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

Differential Revision: https://phabricator.services.mozilla.com/D5083
2018-10-22 22:57:29 -07:00
Matthew Noorenberghe
890e77a220 Bug 1486954 - Part II, Remove OSKeyStore.isEnabled. r=MattN
Given that the new store is always considered enabled, the not-enabled code
is now dead code. This patch removes them.

Differential Revision: https://phabricator.services.mozilla.com/D5717
2018-10-22 22:57:28 -07:00
Timothy Guan-tin Chien
8bca3c3a1a Bug 1486954 - Part I, Encrypt credit card numbers with OS key store. r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D4498
2018-10-17 02:31:04 +00:00
Jared Wein
d99da117e9 Bug 1494551 - Sort the formautofill data by the last used time. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D9174
2018-10-19 17:00:31 +00:00
Margareta Eliza Balazs
11e1ce43c3 Backed out 4 changesets (bug 1486954) for hangs on Linux. a=backout
Backed out changeset c895888bdddc (bug 1486954)
Backed out changeset 27e9286503e8 (bug 1486954)
Backed out changeset 87e64652386d (bug 1486954)
Backed out changeset 96a6e1ceb697 (bug 1486954)
2018-10-18 12:40:21 +03:00
Timothy Guan-tin Chien
4b48150182 Bug 1486954 - Part IV, Recover from decryption errors in some places r=MattN
In case of loss of OS key store key, we should still allow users to go into the manage credit cards dialog and fill the numbers back in.

This is not the migration strategy, see Part III.

Differential Revision: https://phabricator.services.mozilla.com/D5083
2018-10-17 02:34:22 +00:00
Timothy Guan-tin Chien
1784b85bf8 Bug 1486954 - Part II, Remove OSKeyStore.isEnabled r=MattN
Given that the new store is always considered enabled, the not-enabled code
is now dead code. This patch removes them.

Differential Revision: https://phabricator.services.mozilla.com/D5717
2018-10-17 02:32:05 +00:00
Timothy Guan-tin Chien
024a78bd94 Bug 1486954 - Part I, (Nighty-only feature) Encrypt credit card numbers with OS key store r=MattN
This patch morphs MasterPassword.jsm to OSKeyStore.jsm while keeping the same
API, as an adaptor between the API and the native API exposed as nsIOSKeyStore.idl.

Noted that OS Key Store has the concept of "recovery phrase" that we won't
be adopting here. The recovery phrase, together with our label, allow
the user to re-create the same key in OS key store.

Test case changes are needed because we have started asking for login in
places where we'll only do previously when "master password is enabled".
This also made some "when master password is enabled" tests invalid because
it is always considered enabled.

Some more test changes are needed simply because they previously rely on the
stable order of microtask resolutions (and the stable # of promises for a
specific operation). That has certainly changed with OSKeyStore.

The credit card form autofill is only enabled on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D4498
2018-10-17 02:31:04 +00:00
Matthew Noorenberghe
691e05390d Bug 1496069 - Properly pass noValidate to EditAddress and set @novalidate. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D8808
2018-10-16 18:01:35 +00:00
Sam Foster
61030768f4 Bug 1495530 - Use card icons in form autofill card preferences screen. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D7334
2018-10-03 15:58:16 +00:00
Timothy Guan-tin Chien
67e3dcd7aa Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 17:54:48 +00:00
Csoregi Natalia
a34cf6da92 Backed out changeset 56aa054d4cc0 (bug 1399367) for browser/extensions/formautofill/test/unit/test_activeStatus.js failures. CLOSED TREE 2018-09-05 05:47:21 +03:00
Timothy Guan-tin Chien
6071bf1543 Bug 1399367 - Remove MasterPassword.{encrypt|decrypt}Sync() methods r=MattN
This also makes various AutofillRecords methods async, with the exception of
remove() and removeAll().

Noted that I didn't implement any kind of "lock" for FormAutofillStorage --
please do not call these methods concurrently -- if you must please |await|
for the last call to resolve. This most likely would happen in tests, and
shouldn't happen in the real world, given that all user actions happen on
macrotasks, and probably not at the next tick, unless Quicksilver is a
Firefox user.

FormAutofillStorage can be improved if there are complex use cases for it.

Differential Revision: https://phabricator.services.mozilla.com/D4420
2018-09-05 00:32:57 +00:00
Sam Foster
0366c879b7 Bug 1477105 - Support cc-type as valid field for credit cards in form autofill. r=MattN
* Add cc-type as a valid field for credit card forms
* Add a select menu and new string for designating a card type in the add/edit form
* Enforce matching of cc-type to one of the list of supported network ids for Basic Card
* Expose the network ids list as CreditCard.SUPPORTED_TYPES
* Populate the cc-type options using a getCreditCardTypes util method passed into the EditCreditCard constructor

* Web Payment tests: verify cc-type picker is presented, populated as expected and selections received in the response

MozReview-Commit-ID: 9QyU1UwTRay

Differential Revision: https://phabricator.services.mozilla.com/D3830
2018-08-28 15:59:57 -07:00
Mark Banner
76e8f30587 Bug 1478305 - Remove unnecessary imports and fix ESLint warnings about unused variables for browser/. r=jaws
MozReview-Commit-ID: 1vHR6ixePkN
2018-07-30 10:27:36 +01:00
Kris Maglione
76e74e6ca5 Bug 1474140: Don't load FormAutofillUtils.jsm at content process startup. r=MattN
MozReview-Commit-ID: 2bOyTPU9QbX
2018-07-07 17:49:34 -07:00
Jared Wein
e0f9bc267b Bug 1427961 - Regular expression validation for zip/postal codes. r=MattN
MozReview-Commit-ID: 208vx9SBcrq
2018-06-20 17:46:05 -04:00
Jared Wein
b0fc9890f1 Bug 1461477 - Create a CreditCard.jsm to consolidate various credit card handling and validation. r=MattN
MozReview-Commit-ID: 3tJdzU3hBvY
2018-05-15 12:41:35 -04:00
Csoregi Natalia
6a9464cac1 Backed out changeset 9b26de736798 (bug 1461477) for multiple CreditCards failures e.g. browser_manageCreditCardsDialog.js . CLOSED TREE 2018-06-01 21:04:39 +03:00
Jared Wein
d7d5af6823 Bug 1461477 - Create a CreditCard.jsm to consolidate various credit card handling and validation. r=MattN
MozReview-Commit-ID: 3tJdzU3hBvY
2018-05-15 12:41:35 -04:00
mbkupfer
f496b3c400 Bug 1455087 - Support deleting autofill records with the delete key. r=MattN
MozReview-Commit-ID: FiqauWe5oDh
2018-04-19 13:06:59 -07:00
Matthew Noorenberghe
c4094215a1 Bug 1427954 - Pass supported and default countries to EditAutofillForm and move loadInitialValues. r=sfoster
The point of this is to remove dependencies on privileged code from autofillEditForms.js so it can
be used in the unprivileged PaymentRequest dialog. The PaymentRequest dialog will be able to inject
the privileged APIs in a different way.

MozReview-Commit-ID: 4KITOMz7Uxh
2018-03-14 18:11:36 -07:00
Matthew Noorenberghe
28196f5a82 Bug 1427954 - Remove string bundle references from autofillEditForms.js. r=sfoster
This is a step on the path to making it unpriveleged.

MozReview-Commit-ID: 3DSYvM2Pje9
2018-03-14 18:12:15 -07:00
Daniel Marshall
7724f2e32c Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I
2018-02-10 21:23:19 +00:00
Narcis Beleuzu
439cc34017 Backed out changeset a8130e46c530 (bug 1434483) for ESlint failures on browser_change_shipping.js. CLOSED TREE 2018-03-05 23:50:02 +02:00
Daniel Marshall
49ad18cee3 Bug 1434483 - Renamed profileStorage singleton to formAutofillStorage to make it more clear; r=MattN
MozReview-Commit-ID: CaPYBGLfs5I
2018-02-10 21:23:19 +00:00
Ian Moody
a54a2601c7 Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields. r=MattN,scottwu
The context menu shown is the standard web page one, and so inappropriate for
inside preferences.  Keep it on text fields so text editing commands are still
available, though unfortunately so are "This Frame", "Inspect Element", and
"Add a Keyword for this Search".

MozReview-Commit-ID: 7L012CZ4BhR
2018-01-21 22:50:07 +00:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
George Dan, Ryan Neilsen, Dylan Turner
61369dbaa9 Bug 1387632: Rename ProfileStorage module to FormAutofillStorage. r=MattN 2018-01-30 14:44:59 -08:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Ray Lin
fbefb2fd83 Bug 1415022 - Provide additional description message that help user to indicate the profile to be operated. r=seanlee,steveck
MozReview-Commit-ID: 1QNaIQJJZ18
2017-12-01 16:22:01 +08:00
Scott Wu
180814fdae Bug 1423836 - Make credit card month/year select flexible, and remove unnecessary height by setting resizable=no. r=lchang
MozReview-Commit-ID: 7IiuIYT7fWK
2017-12-07 18:02:55 +08:00
Scott Wu
a027f05cd7 Bug 1420883 - Change setting width to min-width for manage addresses dialog. r=lchang
MozReview-Commit-ID: E1jjtfSdjZs
2017-11-28 15:21:47 +08:00
Scott Wu
f420fc3647 Bug 1413162 - Set width to manageAddresses and manageCreditCards dialogs and move button styles to common stylesheets. r=flod,jaws,lchang
Increased the dialog width and align html button styles with XUL button styles (padding, min-width) in common stylesheets.

MozReview-Commit-ID: Czzu0Ar6JfP
2017-11-13 18:36:35 +08:00
Luke Chang
66b98e77e9 Bug 1395122 - [Form Autofill] Treat "cc-number-encrypted" as a computed field and compute it within the storage. r=kitcambridge,MattN,steveck
MozReview-Commit-ID: K58A7Qdj4va
2017-09-08 12:31:02 +08:00
Scott Wu
cb89eccec5 Bug 1407530 - Update formautofill.properties string IDs and localization notes. r=flod,lchang
MozReview-Commit-ID: uHWhQmrVgu
2017-10-11 18:19:35 +08:00
Scott Wu
232eedeea2 Bug 1367322 - Preferences search support for credit card autofill. r=evanxd,lchang
MozReview-Commit-ID: L8sSQkQUvq4
2017-09-14 18:18:24 +08:00
Scott Wu
b29289af0c Bug 1367322 - Preferences search support for address autofill. r=evanxd,lchang
MozReview-Commit-ID: 8r0BhqAPC0A
2017-09-14 18:17:53 +08:00
Scott Wu
74054cdf61 Bug 1397090 - Add the ability to mask credit card numbers after they have been unmasked. r=lchang
MozReview-Commit-ID: GIjhhwgsl5b
2017-09-08 12:11:51 +08:00
Sean Lee
3089106b98 Bug 1394704 - Early return ManageRecords.loadRecords during the loading process. r=lchang,scottwu
MozReview-Commit-ID: 8yR6kDg67PL
2017-08-29 14:09:18 +08:00
Scott Wu
af8b33b1eb Bug 1370768 - (Part 2) Add manage credit cards dialog. r=lchang
MozReview-Commit-ID: 6xl9HuDraIk
2017-08-23 10:12:18 +08:00
Scott Wu
ec0378eff8 Bug 1370768 - (Part 1) Rename manageAddresses to manageDialog. r=lchang
MozReview-Commit-ID: Dr7d9xcxwHR
2017-08-22 18:16:41 +08:00