Skip to content

fix(invite): decode dial-in room name consistently#16977

Open
nishant25kr wants to merge 1 commit intojitsi:masterfrom
nishant25kr:fix/dial-in-room-name-decoding
Open

fix(invite): decode dial-in room name consistently#16977
nishant25kr wants to merge 1 commit intojitsi:masterfrom
nishant25kr:fix/dial-in-room-name-decoding

Conversation

@nishant25kr
Copy link
Contributor

What

Ensure the dial-in info page displays a human-readable room name when the
room query parameter is URL-encoded multiple times.

Why

When opening the dial-in page from desktop/Electron clients, the room name can
arrive double-encoded (e.g. %2520). The page previously decoded only once,
causing %20 to appear in the UI.

How

  • Added a small defensive helper to decode the room name repeatedly
  • Replaced the single decodeURIComponent call with the helper

This keeps the display consistent across web and desktop entry points.

@nishant25kr
Copy link
Contributor Author

Fixes #16958

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

@nishant25kr
Copy link
Contributor Author

Thanks for the heads-up!
I’ve signed the Individual CLA just now. Please let me know if anything else is needed from my side.

@damencho
Copy link
Member

What will happen if room has some of the symbols in the name ... This may change the name?
Have you found why one place encodes it once and the other twice, we should fix that and make sure we decode once

@nishant25kr
Copy link
Contributor Author

Good questions, thanks for raising them.

Symbols in room names
The helper only applies decodeURIComponent and does no normalization beyond URL decoding. Valid encoded characters are rendered in their human-readable form (e.g. %20 → space, %C3%A9é). If the value is already decoded or malformed, it is left unchanged, so there’s no unintended renaming.

Double encoding
The double encoding seems to come from different entry points: the web flow normalizes the room name earlier. This PR keeps the scope limited to the dial-in display layer so the UI is correct regardless of upstream encoding. I’m happy to follow up with a separate PR to address the root cause once the preferred normalization point is agreed on.

@damencho
Copy link
Member

It is better first fix the root cause of this and then check is this needed and avoid adding complexity that may break stuff later.

@nishant25kr
Copy link
Contributor Author

if it is possible can you suggest me how can i approach the root cause of this problem.

Copy link

@DreaserousProductions DreaserousProductions left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change aptly handles the issue at hand.

In case a URL is decoded multiple times, the completely decoded Room Name is returned.

If the URL is malformed or it is already decoded, the fix will retain the original Room Name.

Note: The issue of room names appearing with no spaces is not addressed. The cause is believed to not be in this portion of the codebase.

@damencho
Copy link
Member

if it is possible can you suggest me how can i approach the root cause of this problem.

When creating the more numbers link it should behave correctly and decode the name.

@damencho
Copy link
Member

For example the copy link thingy is already doing it correctly.

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 this pull request may close these issues.

4 participants