Generated secret key exceeds password max_length validation (43 chars > 40 limit) #1913
Unanswered
dipaksinha1
asked this question in
Questions
Replies: 1 comment 1 reply
-
Thanks for reporting! Sorry, I didn't notice you expressed the intention to open PR and I already opened: #1914 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
The README.md documentation (line 150) instructs users to generate secret
keys using:
python -c "import secrets; print(secrets.token_urlsafe(32))"
However, this command generates 43-character strings, which exceeds the
password validation limit of 40 characters defined in
backend/app/models.py:17.
When following the setup instructions and using the generated key for
FIRST_SUPERUSER_PASSWORD, the prestart container fails during
initialization.
Root cause:
Suggested fix:
Change documentation to use token_urlsafe(24) which generates ~32
characters, safely under the 40-character limit.
Affected files:
Operating System
macOS
Operating System Details
Darwin 25.0.0
Python Version
Python 3.10+
Additional Context
This issue affects new users following the official setup guide. The error
only appears after Docker containers are built and the prestart service
tries to create the initial superuser.
I'm happy to submit a PR to fix the documentation once this is confirmed.
Beta Was this translation helpful? Give feedback.
All reactions