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

Add missing parentheses on iphone hostname generation condition #2977

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

jnohlgard
Copy link
Contributor

Describe your changes

Add missing parentheses around the comparison to fill the hostname field from the IdP user data when using iphone.

Issue ticket number and link

No ticket. Found this apparent bug when browsing the code for something completely unrelated, I don't believe this will affect anything in real world usage.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

Copy link

sonarqubecloud bot commented Dec 3, 2024

@CLAassistant
Copy link

CLAassistant commented Dec 3, 2024

CLA assistant check
All committers have signed the CLA.

@pascal-fischer
Copy link
Contributor

Hi @jnohlgard,

you are right, this will have no effect because when a peer doesn't have a userID the IdP lookup will fail and it will fallback to the default name anyway.

Anyway, the code should reflect the proper intended behavior and not rely on the surrounding code to handle this.

That was a very good catch! Thanks a lot for the fix.

@pascal-fischer pascal-fischer merged commit 7dacd9c into netbirdio:main Dec 3, 2024
26 checks passed
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.

3 participants