Commit Graph

8437 Commits

Author SHA1 Message Date
Harry
39ec3d8d56
Hook together RegistrationNavigationController and RegistrationCoordinator
* Move RegistrationNavigationController

* Create the most basic version of RegistrationNavController conceivable

* Hook up RegistrationCoordinator

* Add new scheme for testing registration bravo
2023-02-17 08:00:48 -08:00
Harry
a23d469aac
Finish registration in RegistrationCoordinator
* Finish registration in RegistrationCoordinator

* Get tests to compile again (but not pass)

* Tests passing again

* Test session happy path all the way through to completion

* Test KBS auth credential happy path all the way through to completion

* Test KBS reg recovery password happy path all the way through to completion

* PR comments
2023-02-16 17:21:21 -08:00
Max Radermacher
ad5bf7c597 Fix main queue scheduler 2023-02-16 12:18:15 -08:00
Sasha Weiss
5e0586ba7f
Add a flag for showing username education 2023-02-16 12:11:48 -08:00
Evan Hahn
3586894501
Consolidate E164 -> PhoneNumber code 2023-02-16 09:57:15 -08:00
Evan Hahn
34939106f1
New (dormant) registration UI: confirm before sending codes 2023-02-16 08:03:31 -08:00
Max Radermacher
77977fb597 Add background tasks for orphan data cleaner 2023-02-15 09:49:17 -08:00
Max Radermacher
c923ebd0dc
Fix Promise chain when sending typing indicators 2023-02-15 07:45:12 -08:00
Sasha Weiss
44a6fa24ab
Add contacts' usernames to ContactRecord, if nothing better available 2023-02-14 13:42:53 -08:00
Sasha Weiss
bb7013ec71
Store the local username on AccountRecord 2023-02-14 11:25:48 -08:00
Harry
9501a5bbf5
Populate AccountAttributes in RegistrationCoordinator
* Populate AccountAttributes in RegistrationCoordinator

* pr comments and cleanup
2023-02-14 10:40:47 -08:00
Harry
3d6225060d
Add RegistrationCoordinator
* Add ability to compute registration recovery password

* Add RegistrationCoordinator

* remove repeat nav controller that evan added

* Scaffolding for RegistrationCoodinator test

* Add first round of RegistrationCoordinator tests, some stuff I needed to get them working, and some fixes to RegistrationCoordinator itself I discovered thanks to the tests

* switch to owsFailBeta

* Add auth credential candidate flow tests, related fixes and additions to coordinator and friends

* Add tests for session based registration path and associated fixes

* PR comment nits
2023-02-14 08:50:24 -08:00
Max Radermacher
272093e5f2
Fix device limit exceeded error handling 2023-02-13 13:45:26 -08:00
Max Radermacher
56154557dd
Add isStructurallyValidE164
This merges & replaces `resemblesE164:` and `isValidE164`.

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2023-02-13 13:45:00 -08:00
Ehren Kret
cde10a000a fix lint warnings 2023-02-13 15:24:52 -06:00
Ehren Kret
87b8c36e69 eliminate variable shadowing in some nested transaction write blocks 2023-02-13 15:24:52 -06:00
Ehren Kret
f9a9484874 remove causes of variable shadowing 2023-02-13 15:24:52 -06:00
Ehren Kret
482973fafd do not use same variable for inner for loop as outer 2023-02-13 15:24:52 -06:00
Ehren Kret
8d592857dd rename variables to eliminate shadowing 2023-02-13 15:24:52 -06:00
Ehren Kret
7418f04308 rename variable to eliminate shadowing 2023-02-13 15:24:52 -06:00
Ehren Kret
8a04a8339e clarify variable name to eliminate shadowing 2023-02-13 15:24:52 -06:00
Ehren Kret
ace91b94fc remove unneeded variable that was shadowing another 2023-02-13 15:24:52 -06:00
Ehren Kret
ad0dc54271 rename variable causing shadowing 2023-02-13 15:24:52 -06:00
Max Radermacher
90769ea381
Swiftify OWSDeviceProvisioner 2023-02-13 12:12:16 -08:00
Max Radermacher
a47425f008
Use AES-GCM & AES-CTR from LibSignalClient 2023-02-13 11:29:41 -08:00
Max Radermacher
db2678e86b
Filter storage service contacts more consistently 2023-02-13 10:48:54 -08:00
Max Radermacher
c0850c5a26 Check for corruption in SDSRecord update/insert 2023-02-13 10:45:32 -08:00
Max Radermacher
aa43d78815 Clean up OWSHTTPError.errorUserInfo 2023-02-13 10:44:23 -08:00
Max Radermacher
c13ebc7482
Consolidate storage service code 2023-02-10 17:58:51 -08:00
Max Radermacher
9a4bb85c44 Fix text story sharing from the share extension 2023-02-10 15:54:37 -08:00
Max Radermacher
0b10138c5a
Send sync request messages once per version 2023-02-10 10:24:41 -08:00
Max Radermacher
135074b570 Verify IAS certificates using LibSignalClient 2023-02-10 10:23:50 -08:00
Sasha Weiss
18d8a2cccf
Specific error for trying to search for invalid username 2023-02-10 09:44:54 -08:00
Max Radermacher
3c0c309048
Ignore update/delete requests that are empty
This isn’t required for correctness; it’s a performance optimization.
2023-02-09 13:51:04 -08:00
Max Radermacher
bfe1ec6081 Update CDSv2 MrEnclave 2023-02-09 11:41:28 -08:00
Harry
79fdf07723
Add registration create account, change number, and check kbs credential requests
* Add registration create account, change number, and check kbs credential requests

* some more comments

* pr comments

* Add authentication fields to create account request
2023-02-09 10:11:29 -08:00
Max Radermacher
412cf1e71f Remove unused storage service test code 2023-02-08 19:19:27 -08:00
sashaweiss-signal
e3a9949628 Fix variable names 2023-02-08 16:05:45 -08:00
Sasha Weiss
bcfd291f9c
Add support for username hashing 2023-02-08 16:02:02 -08:00
Harry
fc4ec188e8
Implement RegistrationSessionManager
* Add RegistrationSession object

* Add RegistrationSessionManager protocol

* Add skeleton RegistrationSessionManagerImpl - just kvstore persistence implemented

* Issue requests in RegistrationSessionManagerImpl

* let tests access the in memory kv store

* Add TSRequestOWSURLSessionMock. Rename OWSURLSessionMock

* Add DateProvider

* Take a dateProvider in RegistrationSessionManagerImpl

* Add tests for RegistrationSessionManager

* pre-emptively update timeout for tests. will remove once promise Scheduler code is merged

* PR comments

* Use Schedulers
2023-02-08 15:37:12 -08:00
Max Radermacher
73ac0c69a1
Add SignalRecipient.deviceIds 2023-02-08 13:46:15 -08:00
Max Radermacher
57b21b308d Swiftify pre key request parameters 2023-02-08 12:08:00 -08:00
Max Radermacher
da19593f49
Add & use DeviceMessage type when sending messages 2023-02-08 12:05:13 -08:00
Harry
3c38092f8f
[RFC] Implement TestScheduler for synchronous promise-based tests
* Add Schedulers protocol and TestScheduler implementation

* Use schedulers in KeyBackupService+tests

* add tests for TestScheduler

* typo
2023-02-08 11:19:13 -08:00
Evan Hahn
e40e449c5c
Database recovery: handle failure to read from source table
*I recommend reviewing this with whitespace changes disabled.*

`databaseStorage.read` crashes if there's an error. Normally that's
fine but it's wrong when trying to recover a non-essential table.
2023-02-08 12:29:55 -06:00
Sasha Weiss
e5f1af6c2e
Support lookup-by-username 2023-02-08 10:16:57 -08:00
Evan Hahn
c78a298a0d
Add new registration splash screen (dormant) 2023-02-08 06:34:21 -08:00
Harry
003cc19e62
Update SignalCoreKit. Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params
* Use explicit DispatchQueue instead of relying on the implicit type on promise 'on' params

* Update SignalCoreKit
2023-02-07 16:14:39 -08:00
Evan Hahn
c69ea64084
Remove now-unused RingRTC field trial flag
We stopped using this in 1ba45411ae but I
forgot to remove this flag.
2023-02-07 16:46:13 -06:00
Jordan Rose
bed8b8d0d7 Avoid new transactions in StorageServiceProtoAccountRecord.build(...)
GRDB doesn't support reentrancy even for read transactions.
2023-02-07 13:51:26 -08:00