whisperfish / libsignal-service-rs

A Rust version of the libsignal-service-java library for communicating with Signal servers.
https://whisperfish.github.io/libsignal-service-rs/libsignal_service
GNU Affero General Public License v3.0
65 stars 28 forks source link

Attachment uploads to cdn0 are now rejected under latest Signal for ios #320

Open ccstolley opened 3 weeks ago

ccstolley commented 3 weeks ago

I noticed that Signal.app 7.26.1 (321) for ios started silently dropping my messages with attachments with this error:

2024/09/06 13:32:32:374  ❤ [AttachmentManagerImpl.swift:305 transitTierInfo(from:)]: assertionError: Invalid cdn info
2024/09/06 13:32:32:374  ❤ [MessageReceiver.swift:1144 processFlaglessDataMessage(_:request:thread:tx:)]: Could not build attachments!

Looking at the app code, it looks like ios no longer tolerates attachments that have been uploaded to cdn0:

https://github.com/signalapp/Signal-iOS/blob/7a19cb5ac898b8d5544ef3fae514b43de05182d5/SignalServiceKit/Messages/Attachments/V2/AttachmentManager/AttachmentManagerImpl.swift#L305-L308

As libsignal-server-rs only supports cdn0 currently, we'll need to add support for cdn2 and cdn3 for attachments to work going forward.

rubdos commented 3 weeks ago

Thanks for making us aware! We should've implemented attachment v3 (#34) long ago...

gferon commented 3 weeks ago

I volunteer :smile: I have time next week!

rubdos commented 3 weeks ago

I volunteer 😄 I have time next week!

I have time to read your patches, keep me in the loop! :-)