fix: Correctly percent-encode addresses in securejoin invite codes - #8747
Merged
Merged
Conversation
link2xt
approved these changes
Sep 24, 2026
Collaborator
Reduce is sometimes fine, but not for doing something with the arguments at the same time. E.g. if you need to concatenate all the strings (possibly with the separator), or union all the sets or something like this, then |
Co-authored-by: l <link2xt@testrun.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes how addresses in securejoin invite codes (i.e. QR codes and invite links) are percent-encoded.
Before this PR,
@in the addresses was percent-encoded. This makes the invite code harder to read, and is not necessary; at least, every software we tested correctly handled links that contain@(Signal, WhatsApp, Telegram, Thunderbird, Delta Chat on Android, iOS, and Desktop)r=parameter of a securejoin link was not percent-encoded at all. This was a sneaky bug caused by using thereducefunction; I always find it hard to follow code that usesreduce(and similar functions likefold), and apparently others have the same problem since neither @j-g00da nor @link2xt noticed the problem when implementing & reviewing the PR that introduced the bug.With this PR:
@is allowed in addresses in securejoin invite codesreducedis not used anymore