fix: allow bare filenames in avatar/banner validation, fix password min length

isValidAssetUrl() was rejecting bare filenames (e.g. "1234567890.webp") which
is the established convention the frontend sends. Now accepts bare filenames
while still blocking path traversal and unsafe schemes.

Also updates client-side password validation to match server's 8-char minimum.
This commit is contained in:
Jannis Braun
2026-03-15 00:11:10 +01:00
parent 7c544c1ff4
commit 3a266e07ed
2 changed files with 5 additions and 3 deletions
@@ -214,8 +214,8 @@ export function AccountPanel() {
setPasswordSuccess('');
setPasswordResults(null);
if (newPassword.length < 6) {
setPasswordError('New password must be at least 6 characters');
if (newPassword.length < 8) {
setPasswordError('New password must be at least 8 characters');
return;
}
if (newPassword !== confirmNewPassword) {