Whitespace in Local CNAME records records causes lookup failures
Versions
Core version is v6.0.6 (Latest: v6.0.6) Web version is v6.1 (Latest: v6.1) FTL version is v6.1 (Latest: v6.1)
Platform
- OS and version: Windows 10 Pro 22H2, Firefox 136.0.4 (64-bit) and Chrome 134.0.6998.178 , Linux Mint 22.1 Xia Firefox 134.0.2
- Platform: Docker
Expected behavior
Input fields in "Local CNAME records records" should trim whitespace of failed to validate input
Actual behavior / bug
When hastily copy-pasting full FQDNs from the table into the input fields, tab characters can come with the clipboard before or after the pasted FQDN.
Steps to reproduce
Steps to reproduce the behavior:
- Go to /admin/settings/dnsrecords
- Under Local CNAME records records enter
testing.hostname.localin Domain andhostname.localin Target Domain (whitespace after; tabs or spaces) - Press +
- Entry gets added to /etc/pihole/dnsmasq.conf and result is, note the space after testing.hostname.local /etc/pihole# cat dnsmasq.conf | grep testing cname=testing.hostname.local ,hostname.local
- This results in nslookups failing vs the affected pihole
> google.comServer: [10.9.200.8]Address: 10.9.200.8*** [10.9.200.8] can't find google.com: Server failed
Debug Token
- URL: https://tricorder.pi-hole.net/2jJNt5Gh/
Additional context
Not the same as https://github.com/pi-hole/web/issues/1758 this issue causes DNS lookup failures.
Bug confirmed
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
I believe this should have been closed by #3569
Fixed by https://github.com/pi-hole/web/pull/3569
This appears fixed by Web interface 6.3 and works as expected.