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(jellyfinlogin.tsx): remove extra spaces from login info #616

Closed
wants to merge 1 commit into from

Conversation

jimdogx
Copy link

@jimdogx jimdogx commented Jan 6, 2024

If a user accidentally adds a space to their username or password, they will not be able to login and they won't understand why. This change removes any spaces from the username, password and email when they submit their credentials.

Description

I was trying to log in and it kept saying my username/password were incorrect. Turns out, tab completion or something had added a space at the end of my username. The space is not visible of course, so it looked correct. Re-typing the password several times didn't work until I realized the username had an extra space.

Screenshot (if UI-related)

To-Dos

  • Successful build yarn build
  • [] Translation keys yarn i18n:extract
  • [] Database migration (if required)

Issues Fixed or Closed

  • Fixes #XXXX

If a user accidently adds a space to their username or password, they will not be able to login and
they won't understand why. This change removes any spaces from the username, password and email when
they submit their credentials.
@jimdogx jimdogx requested a review from fallenbagel as a code owner January 6, 2024 14:03
@fallenbagel
Copy link
Owner

Does jellyfin trim usernames/password when storing?

@jimdogx
Copy link
Author

jimdogx commented Jan 6, 2024

Does jellyfin trim usernames/password when storing?

As it turns out, the server does allow spaces. I checked with the Jellyfin server team and the intention was to allow "John Doe" but not actually " John Doe" or "John Doe ", however the regex they use (^[\w\ -'._@]+$) does allow for that.

Which means there could be people out there with extra spaces before/after their username (even though it was not intended to allow this).

@jimdogx jimdogx closed this Jan 6, 2024
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.

2 participants