-
Notifications
You must be signed in to change notification settings - Fork 614
[BUG]: Password requirements checker not working on user editΒ #2702
Description
π Bug Summary
Password requirement icons in the Edit User modal do not update when typing in the password field. The icons remain gray (β) even when password requirements are met, while the Create User form works correctly.
Screen.Recording.2026-02-04.at.16.33.24.mov
π§© Affected Component
Select the area of the project impacted:
-
mcpgateway- API -
mcpgateway- UI (admin panel) -
mcpgateway.wrapper- stdio wrapper - Federation or Transports
- CLI, Makefiles, or shell scripts
- Container setup (Docker/Podman/Compose)
- Other (explain below)
π Steps to Reproduce
- Navigate to the Admin UI
- Go to the Users section
- Click "Edit" on any existing user
- In the Edit User modal, start typing in the "New Password" field
- Observe that password requirement icons remain unchanged (gray β)
π€ Expected Behavior
Password requirement icons should change from gray (β) to green (β) as each requirement is met, matching the behavior of the Create User form.
π Logs / Error Output
No errors in browser console. The issue is a silent failure due to duplicate element IDs in the DOM.
Root Cause Analysis:
Both the Create User form (admin.html) and Edit User form (admin.py) use identical element IDs:
id="req-length"id="req-uppercase"id="req-lowercase"id="req-numbers"id="req-special"id="password-policy-data"
When document.getElementById("req-length") is called from the Edit form's JavaScript (admin.js), it returns the first element with that ID in the DOM (from the Create User form), so the Edit User modal's elements are never updated.