Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Issam Mani dc3e53408c chore: cleanup code 2024-02-26 15:14:43 +00:00
Dimi 031dfc91da First draft version 2024-02-26 15:14:43 +00:00
Ben Dean-Kawamura b6903d97f9 Updated schema testing code
One thing that's nice about this new system is that we can have a
general test that checks if data that was present in the first version
is still present in the current version.  That means we don't need to
define structs to test each different version and the individual upgrade
tests can focus on the specifics for that upgrade.
2021-06-17 14:41:37 -04:00
Ben Dean-Kawamura 8c51caafb0 Updated autofill to use the new open_database code 2021-06-17 14:41:37 -04:00
bendk e67c3aab46
Support scrubbing encrypted data (#4029)
* Ensure databases created before we encrypted card numbers still work.

We just drop the data in the cards table because it's almost impossible
they have actual data, but we do this so we can recreate the table with
the correct schema.

Fixes #4026.

* Update credit_cards_data schema to allow blank cc_number_enc values (SYNC-5158)

We're going to use this to represent encrypted CC numbers that we can no
longer decrypt.

* Added code to scrub encrypted CC numbers (SYNC-2158)

* Top-level scrubbing code code (SYNC-2158)

Added a Store method to scrub the credit card numbers and then set up
refetch them from the server.

* Updating syncing logic to handle scrubbed data (fixes SYNC-2158)

* Adding test_mod test

Adding a test case for scrubbed data, although doesn't seem like these
tests are actually being run.  In fact, I get errors when I try to
import the tests module.  Still, I'm pretty sure this test is correct,
and hopefully it will be useful if/when we get the code here running
again.

* Adding changelog entry

* Reworking changes after review from mhammond

* Code cleanup

- Reindenting some more SQL strings
- Better formating for the changelog

* Added comment explaining some less than perfect code

Co-authored-by: Mark Hammond <mhammond@skippinet.com.au>
Co-authored-by: Ben Dean-Kawamura <ben@pculture.org>
2021-04-20 15:55:26 -04:00
Mark Hammond b393bf9d22
Ensure databases created before we encrypted card numbers still work. (#4027)
We just drop the data in the cards table because it's almost impossible
they have actual data, but we do this so we can recreate the table with
the correct schema.

Fixes #4026.
2021-04-20 10:05:44 +10:00
Mark Hammond 43c0835d37
autofill: add credit-card encryption. (#3906)
Changes the credit-card schema to have `cc_number_enc`, which is encrypted
using jwcrypto, and `cc_number_last_4` which is not encrypted.

This requires the embedding application to perform all the crypto, so
there are new public functions for encrypting, decrypting and creating
new keys. Further, syncing also requires the key, so this is able to be
passed in when doing a sync.
2021-03-23 13:54:34 +11:00
lougeniaC64 0b485208b4
Added outgoing logic for the autofill component (#3885) 2021-03-03 17:52:06 -05:00
Mark Hammond 7737c8df59
autofill: Refactor to duplicate less code and get incoming syncing (almost) working (#3869) 2021-02-22 16:37:41 +11:00
lougeniaC64 bc70bafa11
Implemented core autofill sync15 logic (#3845) 2021-02-09 19:50:50 -05:00
Mark Hammond 037a395d37 Manage autofill tombstones via triggers (fixes #3846) 2021-02-03 10:15:19 +11:00
Mark Hammond f6e9800ce7 Move more of the syncing logic out into shared code.
* Radically rethought the IncomingState in a way that allows the "policy"
  decisions to be shared between Addresses and CreditCards

* Added a new `trait RecordImpl` which abstracts details about the
  records themselves to aid in this sharing.

* Got rid of Record and instead added guid to RecordData, mainly to avoid
  getting too confused - then renamed RecordData to AddressRecord.

* Tweaked the tests with tombstones to better reflect reality - non-tombstones
  have no `deleted` flag, while tombstones have `deleted: true` but no fields.

* Port test_reconcile from desktop to this new world.
2021-02-02 08:00:06 +11:00
lougeniac64 02592aad3d addresses incoming logic 2021-02-02 08:00:06 +11:00
Mark Hammond b054d0ece9
Expose autofill metadata and rationalize some structs. (#3842) 2021-02-01 13:32:48 +11:00
lougeniac64 bf110a2bb1 Added credit card logic 2020-10-05 14:47:39 -04:00
lougeniac64 c369ecd819 Added autofill component 2020-09-19 10:50:44 -04:00