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

FIX(server): Allow unregistered users to transmit access tokens #6339

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

Hartmnt
Copy link
Member

@Hartmnt Hartmnt commented Feb 13, 2024

In 635d719 cache invalidation for access tokens was added. A check for uSource->iId >= 0 was added which was intended to only parse access tokens, if the authenticate method was not returning an error code.

As it turns out though, uSource->iId will be -1 for unREGISTERED users instead of unAUTHENTICATED users which lead to a bug where unregistered users would not have the correct channel access when connecting to the server. A subsequent update of their tokens would fix that.

This commit moves the respective code block down and changes the condition to ok, which should now behave as originally intended.

Fixes #6334

In 635d719 cache invalidation for access tokens was added.
A check for ``uSource->iId >= 0`` was added which was intended
to only parse access tokens, if the ``authenticate`` method was
not returning an error code.

As it turns out though, ``uSource->iId`` will be -1 for unREGISTERED
users instead of unAUTHENTICATED users which lead to a bug
where unregistered users would not have the correct channel access
when connecting to the server. A subsequent update of their tokens
would fix that.

This commit moves the respective code block down and changes the
condition to ``ok``, which should now behave as originally intended.

Fixes mumble-voip#6334
@davidebeatrici
Copy link
Member

davidebeatrici commented Feb 13, 2024

One more reason to get rid of special IDs such as -1 in the future (and use std::optional instead).

@Hartmnt Hartmnt merged commit 348f81c into mumble-voip:master Feb 14, 2024
17 checks passed
@tohizma
Copy link

tohizma commented Feb 15, 2024

Confirmed working fix for my issue #6334
Tested with Mumble Client for Windows and Mumla Android working as expected
Great work @Hartmnt , thank you
mumbleserver16296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug (error) in the software server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access Tokens Rejected When Disconnect and Reconnect to Server
4 participants