web icon indicating copy to clipboard operation
web copied to clipboard

Whitespace in Local CNAME records records causes lookup failures

Open JeffreyJHerr opened this issue 8 months ago • 2 comments

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:

  1. Go to /admin/settings/dnsrecords
  2. Under Local CNAME records records enter testing.hostname.local in Domain and hostname.local in Target Domain (whitespace after; tabs or spaces)
  3. Press +
  4. 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
  5. This results in nslookups failing vs the affected pihole > google.com Server: [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.

JeffreyJHerr avatar Mar 31 '25 14:03 JeffreyJHerr

Bug confirmed

yubiuser avatar Mar 31 '25 14:03 yubiuser

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.

github-actions[bot] avatar May 01 '25 08:05 github-actions[bot]

I believe this should have been closed by #3569

rrobgill avatar Nov 26 '25 01:11 rrobgill

Fixed by https://github.com/pi-hole/web/pull/3569

yubiuser avatar Nov 26 '25 07:11 yubiuser

This appears fixed by Web interface 6.3 and works as expected.

JeffreyJHerr avatar Nov 26 '25 15:11 JeffreyJHerr