Commit Graph

8425 Commits

Author SHA1 Message Date
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
Evan Hahn
a7e6a77eb5
Tweak SQL statement argument count checks 2023-02-07 15:24:58 -06:00
Evan Hahn
a55c1e9347
Update comment to reflect new GRDB method name
`setArgumentsWithValidation` was renamed to `setArguments` in newer
versions of GRDB.
2023-02-07 15:24:58 -06:00
Max Radermacher
a1d84a03e3
Remove unused protobuf definition 2023-02-06 22:16:28 -08:00
Harry
ff7567370c
Add request/response types for Registration Session APIs
* Add UnknownEnumCodable+tests

* Add Registration session requests and responses + tests

* Use shared Accept-Language code
2023-02-06 12:44:31 -08:00
Jordan Rose
42969ce9da Update to RingRTC v2.24.0
RingRTC (along with WebRTC) are no longer included as submodules; now
they are a nearly-standard pod dependency with an extra "prebuild
checksum" to download the built artifacts.

This removes the submodules as well as the storing of the WebRTC
artifact repo commit in the app's Info.plist. RingRTC already prints
the current version in debug logs, so we're not losing anything.
2023-02-06 11:53:14 -08:00
Max Radermacher
2f8d76fed0
Add buildInfallibly to proto wrappers 2023-02-06 11:37:42 -08:00
Evan Hahn
b95a1c4363
Make FullTextSearchFinder stateless
This change should have no user impact. I think this is a useful
cleanup.
2023-02-06 13:33:43 -06:00
Evan Hahn
3cacae049f
Add utilities for recovering corrupted FTS tables
This change should have no user impact. These utilities are currently
unused but will be soon.
2023-02-06 10:38:53 -06:00
Evan Hahn
7efe024940 Explain why a migration lacks a column type
This change should have no user impact.

I created a column in 8d707a9c74. I wanted
it to be a `BLOB`. I succeeded because [SQLite chooses `BLOB` by
default][0], but I wish I had been explicit.

I *could've* updated the migration, but didn't want to make a mistake
and cause divergent migrations. Instead, I added a comment.

I also updated a test.

[0]: https://www.sqlite.org/datatype3.html#determination_of_column_affinity
2023-02-06 08:34:00 -08:00
Harry
60af527ed8 Uptimeouts on KeyBackupServiceTest 2023-02-04 01:07:50 +00:00
george-signal
5fe81c0ad3
Show video duratioin in All Media. 2023-02-03 16:00:46 -08:00
Harry
9a511cdda0
Add deprecated prefix to all existing onboarding/registration types
* Add deprecated prefix to all existing onboarding/registration types. (Will be forked to new versions later, potentially untouched)

* Mark old requests deprecated
2023-02-03 15:02:04 -08:00