oxen-io / libsession-util

Session utilities library
GNU General Public License v3.0
15 stars 16 forks source link

Added code to handle unwrapping double-wrapped config messages #86

Closed mpretty-cyro closed 3 months ago

mpretty-cyro commented 3 months ago

It looks like there was an Android release which resulted in double-wrapped config messages (I'm guessing the libSession submodule was updated past version 1.1 but the original wrapping code wasn't removed from the client which resulted in both the client, and libSession, wrapping the config message)

This PR tries to unwrap the config message twice just in case we receive a config message from the buggy client.

jagerman commented 3 months ago

I was thinking about how you might clean this up with a loop inside a single try, but anything I came up with ended up not any nicer.

mpretty-cyro commented 3 months ago

Yea, I kind of came to the same conclusion - the code doesn't look nice regardless so hopefully it'll annoy us enough to push to remove it as soon as we can 😅