Skip to content

Conversation

@brianfromm
Copy link
Contributor

Summary

Changes

  1. frontend/src/utils/auth.ts - Read response body in signup() to match the pattern used in login()
  2. frontend/src/views/Login.vue - Added handler for 400 status that parses the password length from the error and displays a translated friendly message
  3. frontend/src/i18n/en.json - Added passwordTooShort translation string

Alternative Approach

If you prefer a simpler implementation, the fix to auth.ts alone (reading the response body) would display the backend's error message directly: "400 Bad Request (password is too short, minimum length is 12)". The additional changes in this PR parse the error to show a cleaner message without the HTTP status prefix.

Screenshots

Current behavior (bug)

current-behavior

With passthrough fix only

with-default-message

With this PR (friendly message)

with-custom-message

Checklist

Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • I am aware the project is currently in maintenance-only mode. See README
  • I am aware that translations MUST be made through Transifex and that this PR is NOT a translation update
  • I am making a PR against the master branch.
  • I am sure File Browser can be successfully built. See builds and development.

@brianfromm brianfromm requested a review from a team as a code owner November 19, 2025 03:53
@brianfromm brianfromm force-pushed the fix-signup-error-message branch from 8637a03 to a7090de Compare November 19, 2025 03:54
The signup function was not reading the response body before throwing
an error, causing users to see only "400 Bad Request" instead of the
actual validation message.

Changes:
- Read response body in signup() to capture error details
- Add 400 status handling in Login.vue to display errors in form
- Parse password length errors to show user-friendly message
- Add translation string for password minimum length error

Fixes filebrowser#5499

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@hacdias hacdias force-pushed the fix-signup-error-message branch from a7090de to 7bae594 Compare November 19, 2025 16:41
@hacdias hacdias merged commit 6d5aa35 into filebrowser:master Nov 19, 2025
6 checks passed
@AKSKMY
Copy link

AKSKMY commented Nov 20, 2025

Hi thanks for implementing the fix! Just to check this fix has not been released correct?

@brianfromm
Copy link
Contributor Author

Hi thanks for implementing the fix! Just to check this fix has not been released correct?

Correct. The code has been approved and merged, but it hasn't been added to a release yet. Probably very soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

New User sign up does not show "Minimum character for password" only shows 404 error.

3 participants