8000 dnsmasq: Whitespace should not be allowed between characters in HostnameField · Issue #8733 · opnsense/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dnsmasq: Whitespace should not be allowed between characters in HostnameField #8733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
Monviech opened this issue May 28, 2025 · 2 comments
Closed
2 tasks done
Assignees
Labels
bug Production bug

Comments

@Monviech
Copy link
Member

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

PR: https://www.reddit.com/r/opnsense/comments/1kwuljq/dnsmasq_wont_start_and_i_cant_find_logs/

/ui/dnsmasq/settings#hosts

Due to inconsistent validation of the hostname, whitespaces inbetween characters are allowed.

This causes a dhcp-host to fail hard if it exists

bad DHCP host name at line 109 of /usr/local/etc/dnsmasq.conf

To Reproduce

Steps to reproduce the behavior:

  1. Go to /ui/dnsmasq/settings#hosts
  2. Create a host named abc def abc
  3. Enter an IP address and a hardware address
  4. Apply and dnsmasq will fail with a critical error

Expected behavior

Input validation should prevent non standard hostnames (e.g. whitespaces)

<host type="HostnameField">
<IsDNSName>Y</IsDNSName>
<IpAllowed>N</IpAllowed>
</host>

@Monviech Monviech added the bug Production bug label May 28, 2025
@Monviech
Copy link
Member Author
Monviech commented May 28, 2025

@AdSchellevis

I think the main issue is:

<IsDNSName>Y</IsDNSName>

Removing it disallows the use of whitespaces between characters.

@AdSchellevis
Copy link
Member

@Monviech I know, but when it's a dns type name, whitespaces also shouldn't be allowed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

2 participants
0