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

passwords greater than 32 characters prompt a "username too long" error #613

Closed
ldpr opened this issue Sep 6, 2024 · 7 comments
Closed
Assignees
Labels
Bug Incorrect Behavior
Milestone

Comments

@ldpr
Copy link

ldpr commented Sep 6, 2024

aaaaaaaaaaaa

Tested against the newest alpha running on the demo site.

@josecelano
Copy link
Member

Hi @ldpr, Thank you for reporting. I'm checking it, but I think the problem is not the password. The error message must be wrong.

I've tried with these values and works:

  • username: user123456789
  • email: [email protected]
  • pwd: 123456789123456789123456789123456789

image

@josecelano
Copy link
Member

@ldpr can you share the password you tried?

I can't reproduce it on the demo site:

image

@josecelano
Copy link
Member

@ldpr I was able to reproduce it. The limit is 63 chars, not 32. I don't know why 😮

@josecelano josecelano self-assigned this Sep 6, 2024
@josecelano josecelano added this to the v3.0.0 milestone Sep 6, 2024
@josecelano josecelano added the Bug Incorrect Behavior label Sep 6, 2024
@josecelano
Copy link
Member

The limit is set in the configuration, it's the default value. I didn't remember that even if I was the one who did configuration overhaul 🫨.

[auth.password_constraints]
max_password_length = 64
min_password_length = 6

The message is a copy/paste typo. I'm fixing it:

    #[display(fmt = "Password too short")]
    PasswordTooShort,
    #[display(fmt = "Password too long")]  // <- This was wrong
    PasswordTooLong,
    #[display(fmt = "Passwords don't match")]
    PasswordsDontMatch,

@josecelano
Copy link
Member

Fixing error message on torrust/torrust-index#725 ...

@josecelano
Copy link
Member

I have also realized min (6) and max (64) values are not valid. I'm also changing that. So passwords with 6 or 64 chars will also be allowed.

@josecelano
Copy link
Member

Fixed via torrust/torrust-index#724

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect Behavior
Projects
None yet
Development

No branches or pull requests

2 participants