Repository navigation
Conversation
`/api/config?detailed=true` now reports a `write_only` flag, so the masked input no longer has to be inferred from the `password (write-only string)` type label. That label only ever covered `webserver.api.password`, while `webserver.api.totp_secret` is write-only by flag and typed as a plain string, so it rendered as a normal text field showing `********`. Both are masked now and carry an icon stating that the value cannot be read back. Folding the dedicated password branch into the string case also routes its value and key through `utils.escapeHtml()`, which that branch skipped. Requires pi-hole/FTL#3154. Signed-off-by: DL6ER <dl6er@dl6er.de>
5 tasks done
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two critical issues must be addressed before approval.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR updates the All settings page to mask API-marked write-only values.
Changes:
- Adds a write-only indicator icon.
- Renders flagged string settings as password inputs.
- Preserves value and key escaping.
| File | Summary |
|---|---|
scripts/js/settings-advanced.js |
Adds write-only indicators and masked inputs; critical issues remain around placeholder submission and legacy password-type fallback. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Contributor
|
Conflicts have been resolved. |
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Contributor
|
Conflicts have been resolved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Thank you for your contribution to the Pi-hole Community!
Please read the comments below to help us consider your Pull Request.
We are all volunteers and completing the process outlined will help us review your commits quicker.
Please make sure you
What does this PR aim to accomplish?:
The masked input on the All settings page was so far inferred from the
password (write-only string)type label, which only coverswebserver.api.password.webserver.api.totp_secretis write-only by flag and typed as a plain string, so it rendered as a normal text field showing********.How does this PR accomplish the above?:
The page now uses the
write_onlyflag that pi-hole/FTL#3154 (merged) adds to/api/config?detailed=true. Both settings are masked and carry an icon stating the value cannot be read back. Without the flag, nothing is masked, so this needs an FTL that includes #3154.Link documentation PRs if any are needed to support this PR:
None
By submitting this pull request, I confirm the following:
git rebase)