Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Invalid Padding #288

Closed
Schmiddiii opened this issue Jan 28, 2024 · 0 comments · Fixed by #289
Closed

JSON Invalid Padding #288

Schmiddiii opened this issue Jan 28, 2024 · 0 comments · Fixed by #289

Comments

@Schmiddiii
Copy link
Contributor

Schmiddiii commented Jan 28, 2024

Sometimes the data returned by Signal is in base64-format and not properly padded. Those errors were ignored by the base64-crate with version 0.13, but the dependency update in #280 updated base64 to 0.21 where this error is now thrown.

This is for me constantly reproducible with one group, where a missmatched device always returns invalid padded code.

To fix this, one probably has to replace every use of BASE64_STANDARD with BASE64_STANDARD_NO_PAD.

Related upstream error: https://gitlab.com/schmiddi-on-mobile/flare/-/issues/157. This was first noted by @boxdot in whisperfish/presage#230 (comment).

@Schmiddiii Schmiddiii mentioned this issue Jan 28, 2024
Schmiddiii added a commit to Schmiddiii/presage that referenced this issue Jan 30, 2024
Main fix is for the error "Invalid padding" for JSON decoding.

See <whisperfish/libsignal-service-rs#288>
and <whisperfish/libsignal-service-rs#289>.
gferon pushed a commit to whisperfish/presage that referenced this issue Feb 1, 2024
Main fix is for the error "Invalid padding" for JSON decoding.

See <whisperfish/libsignal-service-rs#288>
and <whisperfish/libsignal-service-rs#289>.
boxdot added a commit to boxdot/gurk-rs that referenced this issue Mar 1, 2024
Includes:

* upgrade of libsignal protocol 0.31 -> 0.40.1
* fix of loosing sync messages
  <whisperfish/presage#241>
* fix of JSON invalid padding
  <whisperfish/libsignal-service-rs#288>
boxdot added a commit to boxdot/gurk-rs that referenced this issue Mar 2, 2024
Also includes

* fix of loosing sync messages
  <whisperfish/presage#241>
* fix of JSON invalid padding
  <whisperfish/libsignal-service-rs#288>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant