Could not use specified username. Value was -4 characters longer than the configured maximum length (16) #404

Closed
opened 2026-02-04 19:03:53 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @rasulovk on GitHub (Jan 31, 2024).

Login to planka go thought Authentik. And Authentik itself has Domain controller integration for login. Some of the users username longer than others, which cause error, and user cannot login:

planka_1 | 2024-01-31 07:41:32 [E] Sending 500 ("Server Error") response:
planka_1 | Invalid new record.
planka_1 | Details:
planka_1 | Could not use specified username. Violated one or more validation rules:
planka_1 | • Value was -4 characters longer than the configured maximum length (16)
planka_1 |
planka_1 |

Please advise how to change the length of username?

Originally created by @rasulovk on GitHub (Jan 31, 2024). Login to planka go thought Authentik. And Authentik itself has Domain controller integration for login. Some of the users username longer than others, which cause error, and user cannot login: planka_1 | 2024-01-31 07:41:32 [E] Sending 500 ("Server Error") response: planka_1 | Invalid new record. planka_1 | Details: planka_1 | Could not use specified `username`. Violated one or more validation rules: planka_1 | • Value was -4 characters longer than the configured maximum length (16) planka_1 | planka_1 | Please advise how to change the length of username?
Author
Owner

@meltyshev commented on GitHub (Jan 31, 2024):

Hi! We've added the ability to ignore username when using OIDC. The new version 1.15.5 is already being built, should be available in about an hour.

UPD: another way is to modify the server/api/models/User.js file and change maxLength, then build your own container. We'll consider adding the ability to have longer usernames in Planka without modification.

@meltyshev commented on GitHub (Jan 31, 2024): Hi! We've added the ability to ignore `username` when using OIDC. The new version 1.15.5 is already being built, should be available in about an hour. UPD: another way is to modify the `server/api/models/User.js` file and change `maxLength`, then build your own container. We'll consider adding the ability to have longer usernames in Planka without modification.
Author
Owner

@rasulovk commented on GitHub (Feb 1, 2024):

@meltyshev

Thanks a lot, it is working. :)

@rasulovk commented on GitHub (Feb 1, 2024): @meltyshev Thanks a lot, it is working. :)
Author
Owner

@woprandi commented on GitHub (Feb 8, 2024):

Why such a low limit and hard-coded ?

@woprandi commented on GitHub (Feb 8, 2024): Why such a low limit and hard-coded ?
Author
Owner

@meltyshev commented on GitHub (Feb 8, 2024):

Why such a low limit and hard-coded ?

Hmm, maybe we really should make the username configurable.

@meltyshev commented on GitHub (Feb 8, 2024): > Why such a low limit and hard-coded ? Hmm, maybe we really should make the username configurable.
Author
Owner

@DrumSlayers commented on GitHub (Jan 13, 2025):

Why such a low limit and hard-coded ?

Hmm, maybe we really should make the username configurable.

Yes definitely ! We do have the same issue here

@DrumSlayers commented on GitHub (Jan 13, 2025): > > Why such a low limit and hard-coded ? > > Hmm, maybe we really should make the username configurable. Yes definitely ! We do have the same issue here
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#404