Wykres commitów

461 Commity (1e491d0b51cc3301290dfabb6dc78f471c7a8fa4)

Autor SHA1 Wiadomość Data
Greyson Parrelli 935dd7de45 Remove E164s most places and prefer ServiceId more places.\ 2022-03-08 10:41:36 -04:00
gram-signal 88d2d4d9c7 Switch from binary to streaming protos when using CDSHv1.
Co-authored-by: Greyson Parrelli <greyson@signal.org>
2022-03-01 10:47:23 -05:00
Cody Henthorne bd18b731c8 Add metrics logging around get resumable upload url request. 2022-03-01 10:47:23 -05:00
Greyson Parrelli 80598814bd Remove unused PushServiceSocket method. 2022-03-01 10:47:23 -05:00
Greyson Parrelli 7ca2420287 Move from ACI to a generic ServiceId. 2022-02-17 17:09:26 -05:00
Cody Henthorne 6f788ee3df Improve GV2 state change processing speed. 2022-02-17 17:09:26 -05:00
Greyson Parrelli dec1902dc7 Add provisioning support for PNP. 2022-02-17 17:09:25 -05:00
Greyson Parrelli e8ad1e8ed1 Support PNI prekeys. 2022-02-16 14:12:34 -05:00
Greyson Parrelli 267897b133 Improve UD handling for fallback REST sends.
Special thanks to @stevie553 for the wonderfully-detailed bug report!

Fixes #11991
2022-02-14 14:58:09 -05:00
Alex Hart 5a6d77bae4
Add better error handling for subscriptions. 2022-02-10 14:26:59 -04:00
Greyson Parrelli ae0d6b5926 Handle unsealed PlaintextContent messages.
Closes #11885

Co-authored-by: AsamK <asamk@gmx.de>
2022-02-10 11:01:18 -05:00
Greyson Parrelli 0558d5f0b3 Clear sender key shared state on archive and prekey message receive.
We need to clear the sender key shared state whenever a registrationId
changes. We don't have good hooks for that on Android, so instead we're
just going to reset on every archive and prekey receive. It's a little
overzealous, but given these are rare events anyway, it shouldn't be a
big deal.
2022-02-10 10:35:22 -05:00
Cody Henthorne bb1e6ffae0
Improve GV2 update speed by only requesting a full snapshot when necessary. 2022-02-09 14:52:01 -05:00
Greyson Parrelli 80a2e1e3cc
Support syncing dontNotifyIfMuted on GV2Records. 2022-02-09 10:03:31 -05:00
Greyson Parrelli 0877d6a25e Improve handling of unknown fields in storage service.
Improve handling of unknown fields in storage service.

Found a lovely bug today where unmuting chats on mobile didn't sync to my linked devices. Turns out this was a result of the unknown field merging. 

1. When a proto has unknown fields, we store the entire proto in a column in our database.
2. After building a proto that we want to write remotely, we merge the saved proto with unknown fields into constructed proto. Most of the time this is fine.
3. _However_, if one of the values you're trying to set happens to be the same as the default value for the given data type (e.g. setting a long like mutedUntil = 0), then when the protos merge, it treats that field as unset and can override it with the field from the proto with unknown fields.
4. Because we currently have unknown fields in every GV2 record, we could never unmute a GV2 group :(

This changes the order of things so that unknown fields are the first thing applied in the record builder. I did this by requiring them in the builder constructors. That way start off with the unknown fields and then can manually set whatever you want, and it'll be guaranteed to override it.
2022-02-08 16:49:49 -04:00
Greyson Parrelli 83ee4c0147 Break storage reads into pages of 1000. 2022-02-08 16:49:49 -04:00
Cody Henthorne 8af7c5043a Fix bug with sending after safety number changes. 2022-02-04 17:33:32 -05:00
Cody Henthorne a05776551f Fix sending reactions to note to self. 2022-02-03 17:12:30 -05:00
Cody Henthorne d690a52fd7 Add additional timing logs for getting resumable upload spec. 2022-02-02 16:50:58 -05:00
Cody Henthorne 8348badcd6 Periodically fetch release notes. 2022-02-02 16:50:58 -05:00
Cody Henthorne 7a241e5fb5 Use group state paging always. 2022-02-02 16:50:58 -05:00
Greyson Parrelli 33f4bb0000 Add the ability to have separate ACI and PNI protocol stores. 2022-02-01 13:41:31 -05:00
Cody Henthorne 053b19846b
Add additional log around change number and set PNI. 2022-01-26 15:13:52 -05:00
AsamK 523e21f3be Improve handling of group send errors over websocket.
- Correctly parse error responses from send group message via websocket.
- Reduce logging output for mismatched/stale devices exceptions.
- Only fallback from websocket to socket if there were technical errors.

Closes #11918
2022-01-25 10:02:26 -04:00
Greyson Parrelli 35c5a8106d
Migrate to the new KBS and CDS enclaves. 2022-01-24 14:46:51 -05:00
Cody Henthorne 22c396067d Add storage sync support for linked devices. 2022-01-24 12:05:29 -05:00
Cody Henthorne c548816daa Add contact and key sync message receive support. 2022-01-24 12:04:48 -05:00
Cody Henthorne 7203228626 Add partial support for operating as a linked device. 2022-01-24 12:04:48 -05:00
Greyson Parrelli b5dcf8e8f1
Improve handling of inbound UD messages. 2022-01-21 12:51:22 -05:00
Cody Henthorne 791c1ee8dd Fix group send with sender key failure due to mistmatch identity. 2022-01-20 20:41:06 -05:00
Greyson Parrelli 8bc7d1b7f5 Drop messages that have a story context. 2022-01-07 14:41:42 -04:00
Cody Henthorne e41c73f293 Fix OOM when paging lots of group updates. 2022-01-07 14:41:42 -04:00
Alan Evans ac90eeb42f Protoc update to 3.18.0
Windows and M1 gradle verification sha256 values.

Using: gradlew --write-verification-metadata sha256 help

But aapt2 artifact had to be manually added.

Fixes #11871, Fixes #11878, Closes #11877
2022-01-03 10:17:17 -05:00
Greyson Parrelli a17fd447a7 Add logging to help diagnose ratelimit issues. 2021-12-20 13:31:18 -05:00
Alex Hart 9177f5637a Add support for manual cancellation proto field. 2021-12-20 13:31:18 -05:00
Rashad Sookram 4ae129d2af Use Gradle dependency verification.
Generated by running:
./gradlew --write-verification-metadata sha256 qa --rerun-tasks
2021-12-16 14:48:25 -05:00
Greyson Parrelli c93457402c
Store your own PNI. 2021-12-06 12:18:42 -05:00
Greyson Parrelli 562a255478 Update libsignal-client to 0.11.0 2021-12-03 18:09:52 -05:00
Alex Hart ae1f834619 Add new subscription multi device sync message. 2021-11-30 17:13:14 -05:00
Ehren Kret dccfafa9e8 Remove dead code referencing the old way directory lookup was performed. 2021-11-30 17:13:10 -05:00
Cody Henthorne c5d7188dcb Fix country specific translations for badges. 2021-11-24 16:41:12 -05:00
Greyson Parrelli 11aa168a6b Improve handling of unregistered failure during sender key send. 2021-11-23 17:00:47 -05:00
Greyson Parrelli cd1f0632fa Improve recognition of failed payment states. 2021-11-22 22:44:10 -05:00
Alex Hart f260633c9d Update payment failure ux. 2021-11-19 16:28:39 -05:00
Alex Hart 8a00caabd7 Update how we deal with failed or in progress subscriptions. 2021-11-19 16:28:39 -05:00
Greyson Parrelli 8aea20f147 Migrate local account data into SignalStore. 2021-11-17 16:14:26 -05:00
Greyson Parrelli 2df303cde7 Add some additional endpoints for PNP. 2021-11-16 17:27:47 -05:00
Greyson Parrelli 732a6324d6 Include auth token in CDSH request. 2021-11-16 17:27:47 -05:00
Greyson Parrelli 54614e67aa Update CDSH with better error handling. 2021-11-16 17:27:47 -05:00
AsamK 1ad0b0e6ae Close response body for all storage requests and for unsuccessful requests. 2021-11-16 17:27:47 -05:00
Jordan Rose 7ccc7ec856 Update to libsignal-client 0.10.0, which includes zkgroup. 2021-11-16 17:27:47 -05:00
Alex Hart 882bdcc726
Send user an email after Stripe completes payment for boosts. 2021-11-15 13:48:19 -04:00
Alex Hart 6b94fc82eb Add and sync displayBadgesOnProfile Flag. 2021-11-11 16:52:08 -04:00
Alex Hart 482a10de02 Improve handling of network timeouts for donor badges. 2021-11-05 15:36:30 -04:00
Cody Henthorne 9827deffd3 Make websocket timeouts stay on IO threads. 2021-11-04 18:29:51 -04:00
Alex Hart 70355aa70e Add server-based localization of subscription names and badge information. 2021-11-04 17:00:04 -04:00
Greyson Parrelli 56c502c9bf Update libphonenumber to 8.12.33 2021-11-04 17:00:04 -04:00
Greyson Parrelli a51bb8e23f Add LeakCanary to flipper builds. 2021-11-04 16:59:59 -04:00
Greyson Parrelli 3574be913a Log out sender key state for internal users. 2021-11-04 16:59:59 -04:00
Greyson Parrelli 4615f246ac Log additional info about 409/410 responses. 2021-11-04 16:57:10 -04:00
Greyson Parrelli 62ee60df82 Add full support for unknown fields in storage service. 2021-11-01 17:07:01 -04:00
Alex Hart 6673da0b04 Add subscriber information to storage service account record. 2021-11-01 16:48:42 -04:00
Greyson Parrelli 5bb48caafd Strongly type UUIDs as ACIs. 2021-11-01 16:48:41 -04:00
Alex Hart 186bd9db48 Implement new APIs for Boost badging. 2021-11-01 16:48:41 -04:00
Greyson Parrelli 48a81da883 Handle non-normalized phone number responses. 2021-11-01 16:48:41 -04:00
Alex Hart c1820459b7 Implement further features for badges.
* Add Subscriptions API
* Add Accept-Language header to profile requests
* Fix several UI bugs, add error dialogs, etc.
2021-10-21 17:11:46 -04:00
Greyson Parrelli 13ef53372e Remove the reset session button. 2021-10-21 17:11:46 -04:00
Greyson Parrelli b89e08dad7 Update libsignal-client to 0.9.7 2021-10-21 17:11:46 -04:00
Alex Hart 43e4cba3d7
Implement the majority of the Donor UI. 2021-10-12 15:55:54 -03:00
Greyson Parrelli 92e506b117 Update libsignal-client to 0.9.6 2021-10-04 21:49:59 -04:00
Alex Hart 7f3ba1978d Add RedeemReceiptRequest object and DonationService. 2021-10-04 21:49:59 -04:00
Alex Hart 891dfc1b68 Upgrade zkgroups to 0.8.2 2021-10-04 21:49:59 -04:00
Alex Hart 8d53c2392a Update zkgroup to v0.8.1 2021-10-04 21:49:59 -04:00
Alex Hart 8d0acb277c Add support for updated server badge image url formats. 2021-10-04 21:49:59 -04:00
Greyson Parrelli 1222d020ad Fix address list for sender key messages. 2021-10-04 20:50:08 -04:00
Fumiaki Yoshimatsu e18d9e665f Take padded bytes into account when decrypting a stream of data.
Fixes #11573
2021-09-28 11:42:51 -04:00
Greyson Parrelli cc99febe32 Allow use of the new CDSH service in staging. 2021-09-28 11:42:51 -04:00
Greyson Parrelli 7267d77dcb Add support for syncing default reactions. 2021-09-23 11:35:21 -03:00
Alex Hart 77cf029fdc Implement ability to view badges and modify whether they appear.
Note: this is available in staging only.
2021-09-23 11:35:21 -03:00
Greyson Parrelli 1031a4e96c Improve logging around message sending and processing. 2021-09-16 14:17:38 -03:00
Alex Hart b589449c34 Consolidate app dependencies using gradle version catalogs. 2021-09-16 14:17:38 -03:00
Alex Hart 662ba85c5a Upgrade to Gradle 7.2 and AGP 7.0.2 2021-09-16 14:17:38 -03:00
Greyson Parrelli 573c0fad7f Update libsignal-client to 0.9.4 2021-09-14 09:07:43 -04:00
Cody Henthorne 7e7bbad788 Ensure change number operation status before returning to normal app usage. 2021-09-08 21:04:21 -04:00
Cody Henthorne 77ff25ec49 Add Change Number capability and Conversation Update item. 2021-09-08 21:04:06 -04:00
Cody Henthorne f2ab0b6423 Initial work to support Change Number. 2021-09-03 20:19:56 -04:00
Cody Henthorne 8e32592218 Clarify networking call order during registration flow. 2021-09-02 21:24:53 -04:00
Greyson Parrelli bca2205945 Add measurements, improve MSL insert. 2021-09-02 21:24:53 -04:00
Greyson Parrelli aec2ca1d87 Update libsignal-client to 0.9.0 2021-09-02 11:21:15 -04:00
Greyson Parrelli 1819af3000 Fix possible crash when a contact merge results in no UUID.
After merging contacts, it's possible that we don't have a valid
UUID. We need to be careful not to use it.

Kind of a bummer, but the storage sync flow is currently the only flow
where we have this 'possibly not valid UUID'. In the future we should
probably use something else instead of a SignalServiceAddress to keep
that abstraction clean.
2021-09-01 10:46:42 -04:00
Greyson Parrelli 45a6894da1 Handle invalid registrationIds during sender key sends. 2021-08-30 20:32:41 -04:00
Greyson Parrelli 08008629b3 Fix some issues around SignalServiceAddress creation. 2021-08-27 14:43:38 -03:00
Greyson Parrelli b21abb8e7e Fix crash during block list parsing. 2021-08-26 09:51:28 -04:00
Alex Hart 3f233ed39f
Use AttachmentsV2 if the resumable upload link from V3 becomes corrupted. 2021-08-26 10:24:20 -03:00
Greyson Parrelli 28d86886bd Update handling of invalid unknown fields. 2021-08-25 13:34:29 -04:00
Cody Henthorne c1fb4f9421
Include urgency in opaque call message sends. 2021-08-25 09:28:16 -04:00
Greyson Parrelli 665d9e31f6 Separate thread updates into a job and other perf improvements. 2021-08-24 16:59:09 -03:00
Cody Henthorne db7272730e Add Small Group Ringing support. 2021-08-24 16:59:09 -03:00
Greyson Parrelli 2068fa8041 Several sender key performance improvements.
- Remove extra unnecessary sync message
- Add a bulk session retrieval method
- Do the encrypt in a transaction
2021-08-24 16:59:09 -03:00
Greyson Parrelli 642d1984c4 Ensure all SignalServiceAddresses have UUIDs. 2021-08-24 09:09:27 -03:00
Greyson Parrelli 0ab2100fa5 Update libsignal-client to 0.8.4 2021-08-24 09:09:27 -03:00
Greyson Parrelli f6b2d3faf8 Small refactor to building the sender key target list. 2021-08-06 17:49:08 -04:00
Greyson Parrelli 61c7959ffc Ensure typing indicators are sent as online messages with sender key. 2021-08-06 17:29:25 -04:00
Greyson Parrelli 67ccd14af2 Ensure certain sender key payloads are serialized properly. 2021-08-06 17:29:02 -04:00
Greyson Parrelli 0762a93787
Refactor protobuf validation exceptions. 2021-08-06 14:47:43 -04:00
Cody Henthorne 570b4d7150
Fix bug with processing and displaying long messages with mentions. 2021-08-06 13:19:44 -04:00
Greyson Parrelli c1c9ca7c4c Give the service direct knowledge of linked device status. 2021-07-30 17:39:29 -04:00
Greyson Parrelli 75421b1af8 Rebuild list of send targets after sending distribution key. 2021-07-30 13:17:43 -04:00
Greyson Parrelli d40bb2d9ee Clear all sender key knowledge for a device after a 409/410. 2021-07-30 13:17:43 -04:00
Greyson Parrelli 25234496bf Add support for announcement groups. 2021-07-28 17:21:19 -04:00
Cody Henthorne 712b0c147a
Improve WebSocket health monitoring. 2021-07-27 13:40:33 -04:00
Alex Hart ed23c3fe7c Add avatar picker and defaults. 2021-07-21 16:57:03 -04:00
Greyson Parrelli 4a0e6a3eb2 Improve logging around message sends. 2021-07-16 12:53:29 -04:00
Cody Henthorne 5d6d78a51e Initial WebSocket refactor. 2021-07-15 16:28:13 -04:00
Jordan Rose 68a2d5ed20 Reimplement ProfileCipherInputStream using libsignal-client.
libsignal-client provides an AES-GCM streaming interface that can
replace the implementation in AES-GCM-Provider. Using it from
ProfileCipherInputStream requires some knowledge about the tag size of
AES-GCM, but frees it from the JCE interface.

Note that it remains a serious error to not read the *entire* stream,
since the authentication tag is at the end!
2021-07-15 16:28:11 -04:00
Jordan Rose 35e9e31a7b Update to libsignal-client 0.8.3
This also fixes a misalignment where signal-client-android was on
0.8.0 but signal-client-java was 0.8.1, which was fortunately harmless
for this particular pair of versions.
2021-07-12 20:29:07 -04:00
Cody Henthorne 444d947743 Add RxJava. 2021-07-12 20:29:07 -04:00
Cody Henthorne 182749c101 Fix bug where some profile fetches would 400 over the websocket. 2021-07-09 15:30:08 -04:00
Greyson Parrelli 7f0a0bef5a Incrementally insert MSL entries for legacy group sends. 2021-07-07 14:58:50 -03:00
Greyson Parrelli a1c8573fad Insert resent messages at the proper location. 2021-07-07 14:58:50 -03:00
Cody Henthorne 90a27d2227 Fix device transfer test dependent on native library. 2021-07-07 14:58:50 -03:00
Greyson Parrelli f19033a7a2 Implement the message send log for sender key retries. 2021-06-24 16:36:13 -04:00
Greyson Parrelli 6502ef64ce
Read the group history response as a stream. 2021-06-23 17:47:05 -04:00
Alex Hart dfe804dfa0 Increment GIF flag in AttachmentPointer to avoid android client bug. 2021-06-08 16:53:21 -03:00
Greyson Parrelli 57c0b8fd0f Initial pre-alpha support for sender key. 2021-06-07 18:14:12 -04:00
Greyson Parrelli 1322f5bc08 Be more careful with unknown IDs during storage sync. 2021-05-27 16:17:07 -04:00
Greyson Parrelli e74d502ae6
Remove legacy session version.
Hasn't been used since the TextSecure days!
2021-05-26 17:46:58 -04:00
Cody Henthorne defd5e8047 Add universal disappearing messages. 2021-05-18 18:21:48 -04:00
Greyson Parrelli 8c6a88374b No longer use SignalServiceAddress legacy identifier.
We had to do this in the past because we previously didn't allow
UUID-only contacts back in the day. This hasn't been the case for some
time. We should be preferring the UUID in all cases.
2021-05-18 18:21:48 -04:00
Cody Henthorne ef5b68eb35 Add report spam in message request state. 2021-05-17 17:03:21 -03:00
Greyson Parrelli 80c911e118
Sync whether or not our primary device can send SMS. 2021-05-12 14:58:19 -04:00
Greyson Parrelli 2d2de1a652
Fix storage service record merge. 2021-05-12 10:56:34 -04:00
Cody Henthorne 8c9df8d3be Add support for Group V2 description field. 2021-05-10 19:30:10 -04:00
Greyson Parrelli 03b65ce6dc Update to libsignal-client 0.5.1 2021-05-10 19:30:10 -04:00
Greyson Parrelli 31e1c6f7aa Handle 428 rate limiting. 2021-05-05 16:47:13 -04:00
Greyson Parrelli 2f30d29351 Ensure we have a storageId for self. 2021-04-29 17:55:34 -04:00
Alex Hart ab44d608d2 Add support for sending and syncing viewed receipts behind a feature flag. 2021-04-28 16:36:11 -03:00
Greyson Parrelli cdc7f1565e Further simplify storage service syncing. 2021-04-28 16:36:11 -03:00
Alex Hart bf124b87fa
Fix bad flag parsing on attachment pointers. 2021-04-22 14:46:20 -03:00
Alex Hart c31146e902 Render gifs in gif search as MP4s. 2021-04-19 18:11:56 -04:00
Cody Henthorne 2547db2a8e Revert "Prevent changes to conversations while device is unregistered."
This reverts commit ed8edb5aee.
2021-04-14 18:02:57 -04:00
Cody Henthorne ed8edb5aee Prevent changes to conversations while device is unregistered. 2021-04-14 15:50:40 -04:00
Greyson Parrelli 20b98122c1
Send an empty group sync when linking devices if no groups exist. 2021-04-13 11:35:42 -04:00
Greyson Parrelli 35c102aa98
Fix issues with StorageSyncV2 bookkeeping.
1. I screwed up the comparators in the record processor. Pretty bad, glad this was caught.
2. Previously I was sort of keeping track of which local-only records were accounted for while I was merging, and then hoping everything worked out in the end. Now I just very directly take some set differences and retrieve the appropriate records, so it's clear that we should never fail certain validations.
3. Rev's the feature flag so we don't turn on something broken.
2021-04-13 11:32:24 -04:00
Greyson Parrelli e096ba27ce Sync mute status via storage service. 2021-04-12 12:25:09 -04:00
Greyson Parrelli 0e200b1fb6 Rewrite storage service change processing. 2021-04-12 12:25:09 -04:00
Alan Evans 113393de8f Enforce upper bound on MobileCoin/fiat entry. 2021-04-09 11:17:50 -03:00
Android Team c42023855b Service support for Payments.
Co-authored-by: Alan Evans <alan@signal.org>
Co-authored-by: Alex Hart <alex@signal.org>
Co-authored-by: Cody Henthorne <cody@signal.org>
2021-04-06 15:27:23 -03:00
Chris Eager 09cba8774d Add support for verification codes without an internal hyphen 2021-03-19 14:38:30 -05:00
Greyson Parrelli 8950100bd7
Decrypt and process messages all in one transaction.
Giddy up
2021-02-23 18:34:18 -05:00