Skip to content

fix(configuration): never show a stored secret in a configuration form - #1481

Merged
harshithmohan merged 2 commits into
revamfrom
split/04-configuration-secrets
Oct 4, 2026
Merged

harshithmohan merged 2 commits into
revamfrom
split/04-configuration-secrets

Conversation

@revam

@revam revam commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Why

Configuration forms put the server's masked placeholder for a stored secret (***SECRET-UNCHANGED…***) into a plain text box.

What changed

  • DynamicField renders the password element type with the new PasswordField: masked, empty, with an "Unchanged (hidden)" placeholder while a secret is stored.
  • Left alone, the field sends the masked value back so the server keeps the secret; otherwise what was typed, or an empty string when cleared.
  • A clear button for a stored secret, an undo back to it, and a show/hide toggle for what was typed.

Note for review: Touches how secrets are sent back to the server: the field never shows a stored secret, and only sends one when it was typed.

Where to look first

  • src/components/Dynamic/PasswordField.tsx: the whole behaviour.

Feedback wanted

Whether keeping, replacing and clearing a secret are clear enough from the field alone.

Stack

Part 4 of 12 in the split of #1477. Below: Part 3, the SignalR event names. Above: Part 5, two-parameter filter conditions.

Testing

pnpm tscheck, pnpm lint, pnpm test and pnpm build pass at this branch's tip. Manual, on 6.0.0-dev.495: a plugin configuration with a secret; save without touching it, then clear it, then replace it.

@revam
revam added this pull request to stack #1490 October 3, 2026 17:38
@harshithmohan
harshithmohan force-pushed the split/04-configuration-secrets branch from 161b242 to 2eec211 Compare October 3, 2026 17:43
@revam
revam force-pushed the split/04-configuration-secrets branch from 2eec211 to 81d9997 Compare October 3, 2026 18:48
@harshithmohan
harshithmohan force-pushed the split/04-configuration-secrets branch from 81d9997 to 09b6971 Compare October 4, 2026 06:14
Base automatically changed from split/03-signalr-events to revam October 4, 2026 06:27
- Rendered the `password` element type as a masked input, empty with an "Unchanged (hidden)" placeholder while the server sends `***SECRET-UNCHANGED…***`, which went into a text box before
- Sent the masked value back when the field is left alone, so the server keeps the secret, what was typed otherwise, and an empty string when cleared
- Added a clear button for a stored secret, an undo back to it, and a show/hide toggle for what was typed
@harshithmohan
harshithmohan force-pushed the split/04-configuration-secrets branch from 09b6971 to f287d1b Compare October 4, 2026 06:27
@harshithmohan
harshithmohan merged commit 4acdb5f into revam Oct 4, 2026
1 check passed
@harshithmohan
harshithmohan deleted the split/04-configuration-secrets branch October 5, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants