Every time I try to apply this setting the webpage would just go back to the logscreen. When I go back to check if it's been applied it's always set to NULL.
Is this a known issue? Can anyone else reproduce it?
I am using Docker ( with this image: sha256:a75a88c6372c3ac56ce2ffe9f2c177457e1d3c38d438bcf40513f58aba7ec362).
DL6ER
October 17, 2023, 3:08pm
3
Thanks for your report. I was able to reproduce it. The issue happens only with NXDOMAIN
and IP-NODATA-AAAA
, all others work.
The reason for this is that the strings used in internally by FTL deviated from the ones offered here on the Settings page. A code change in FTL ensures this cannot happen. The fix furthermore prevents the settings page from logging you out when you don't change the password or TOTP secret. There was a small glitch which made FTL think it'd to invalidate all API sessions due to a password change even when there was none.
pi-hole:development-v6
← pi-hole:fix/api_settings
opened 03:07PM - 17 Oct 23 UTC
# What does this implement/fix?
This PR fixes three connected issues with the… API endpoint `/api/config`:
- Fix detection of unchanged password. This fixes a forced invalidation of all currently active API session on every config change because every saving was misinterpreted as a password change.
- Ensure we are using the same constants everywhere for our enums (this fixes the issue reported on [Discourse](https://discourse.pi-hole.net/t/dns-blocking-mode-does-not-apply/65674))
- Tweak `misc.privacylevel` to also accept numbers formatted as strings. This can happen when using a dropdown select as done, e.g., on the web interface in `System-> Settings -> All Settings`.
**Related issue or feature (if applicable):** N/A
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
---
**By submitting this pull request, I confirm the following:**
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
2. I have commented my proposed changes within the code.
3. I am willing to help maintain this change if there are issues with it later.
4. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)
5. I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
## Checklist:
- [x] The code change is tested and works locally.
- [x] I based my code and PRs against the repositories `developmental` branch.
- [x] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
- [x] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
- [x] I have read the above and my PR is ready for review.