mirror of
https://github.com/isuryatk/pm2-webui.git
synced 2026-04-26 00:35:53 +03:00
[PR #24] Fix admin user creation validation in pm2-webui #23
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pm2-webui#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/isuryatk/pm2-webui/pull/24
Author: @awktpk
Created: 9/12/2025
Status: 🔄 Open
Base:
main← Head:patch-1📝 Commits (1)
f27f0caFix admin user creation validation in pm2-webui📊 Changes
1 file changed (+26 additions, -28 deletions)
View changed files
📝
src/bin/setup-admin-user.js(+26 -28)📄 Description
Changes made:
Username validation updated
Allowed both uppercase and lowercase letters.
Kept support for numbers and underscores (_).
Minimum length remains 4 characters.
Updated error message to match actual rules.
Password validation fixed
Requires minimum 8 characters.
Must include at least one uppercase letter, one lowercase letter, one number, and one special character.
Expanded special characters to any non-alphanumeric symbol, not just [!@#$%^&*].
Trimmed input to prevent leading/trailing space issues.
Error message updated to accurately reflect rules.
General cleanup
Corrected mismatched error messages for username and password.
Ensured consistent formatting and validation logic.
Result:
Admin username can now include uppercase letters.
Password validation works correctly with flexible special characters.
Users get clear, accurate error messages when creating/updating admin accounts.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.