Skip to content
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

Use fully qualified domain name in DNS queries #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erkia
Copy link

@erkia erkia commented Feb 26, 2024

Hi!

SPF checks must be performed on fully qualified domain names (FQDN). This means, that when calling dns_get_record(), domain must end with zero-length label (dot).

Without dot at the end, resolver may search additional domain names, causing unnecessary delays or wrong results. In my case it tries to search .local domain, which tries to resolve non-existent A/AAAA records over mDNS, which causes long delays because of timeouts.

Here is a small pull-request to fix this.

BR,
Erki

@Mika56
Copy link
Owner

Mika56 commented Feb 26, 2024

The tests are failing because Symfony's PHPUnit Bridge DnsMock does not "ignore" the trailing dot.
Can you please try to update tests/DNSRecordGetterTest.php and add a trailing dot to each key when calling DnsMock::withMockedHosts?

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

Successfully merging this pull request may close these issues.

2 participants