Skip to content

mgr/dashboard: add validation for username - #70046

Merged
afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix-IBMCEPH-15229
Jul 17, 2026
Merged

afreen23 merged 1 commit into
ceph:mainfrom
rhcs-dashboard:fix-IBMCEPH-15229

Conversation

@sagargopale2233

@sagargopale2233 sagargopale2233 commented Jul 8, 2026 •

Copy link
Copy Markdown

mgr/dashboard: add validation for username

Fix : https://tracker.ceph.com/issues/78077

Signed-off-by: Sagar Gopale [email protected]

PR Description :
This PR resolves a bug where creating dashboard users with special characters (like .. or ??) caused 404 errors and page crashes during edit and delete operations. It introduces strict frontend validation to ensure new usernames only contain safe characters, preventing the issue from occurring. Additionally, it safely handles any pre-existing invalid usernames by properly encoding them so they can still be successfully managed or deleted without breaking the UI.

Screencast :
Screencast From 2026-07-09 12-41-58.webm

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@sagargopale2233 sagargopale2233 self-assigned this Jul 8, 2026
@sagargopale2233
sagargopale2233 marked this pull request as ready for review July 9, 2026 07:23
@sagargopale2233
sagargopale2233 requested a review from a team as a code owner July 9, 2026 07:23
@sagargopale2233
sagargopale2233 force-pushed the fix-IBMCEPH-15229 branch 2 times, most recently from af8de38 to c74f058 Compare July 13, 2026 07:48

@afreen23 afreen23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good validation work. Two things — remove bootstrap class and fix failing dashboard tests.

@github-project-automation github-project-automation Bot moved this from New to Review in progress in Ceph-Dashboard Jul 13, 2026
@sagargopale2233
sagargopale2233 force-pushed the fix-IBMCEPH-15229 branch 3 times, most recently from ba23e14 to d7365e0 Compare July 14, 2026 13:59
@sagargopale2233
sagargopale2233 requested a review from afreen23 July 14, 2026 14:13
@sagargopale2233
sagargopale2233 force-pushed the fix-IBMCEPH-15229 branch 2 times, most recently from b2f0bf2 to b1e9d13 Compare July 15, 2026 07:22

@afreen23 afreen23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from Review in progress to Reviewer approved in Ceph-Dashboard Jul 15, 2026
@sagargopale2233

Copy link
Copy Markdown
Author

jenkins test make check

@sagargopale2233

Copy link
Copy Markdown
Author

jenkins test dashboard

2 similar comments
@sagargopale2233

Copy link
Copy Markdown
Author

jenkins test dashboard

@sagargopale2233

Copy link
Copy Markdown
Author

jenkins test dashboard

@pujaoshahu pujaoshahu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afreen23 afreen23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afreen23
afreen23 merged commit 36b2e02 into ceph:main Jul 17, 2026
6 checks passed
@afreen23
afreen23 deleted the fix-IBMCEPH-15229 branch July 17, 2026 13:49
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants