[PR #24] Fix admin user creation validation in pm2-webui #23

Open
opened 2026-03-03 13:50:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/isuryatk/pm2-webui/pull/24
Author: @awktpk
Created: 9/12/2025
Status: 🔄 Open

Base: mainHead: patch-1


📝 Commits (1)

  • f27f0ca Fix 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.

## 📋 Pull Request Information **Original PR:** https://github.com/isuryatk/pm2-webui/pull/24 **Author:** [@awktpk](https://github.com/awktpk) **Created:** 9/12/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`f27f0ca`](https://github.com/isuryatk/pm2-webui/commit/f27f0caa05d6cab23c6388d9c3967bd21a15c561) Fix admin user creation validation in pm2-webui ### 📊 Changes **1 file changed** (+26 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `src/bin/setup-admin-user.js` (+26 -28) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pm2-webui#23
No description provided.