Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Direct query to the server for a zone's SOA record fails

Open Beginner friendly
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
php
Domain
networking

Research direction

Start in Utopia\DNS\Zone\Resolver::lookup(), after the zero-query check and before selecting the best matching records. Verify the behavior for a query whose type is SOA and whose name matches the zone; done means the response returns the zone's SOA record with NOERROR and authoritative status instead of NXDOMAIN.

Written by the indexing model from the issue text.

Description

A query to the server for a zone's own SOA record returns NXDOMAIN, when I would expect it to return the SOA record for the zone. This appears to happen because the SOA record is in the Zone's soa property, not an element of the Zone's records array, so a match is not found by lookup() in Utopia\DNS\Zone\Resolver.

A possible fix would be to add an explicit check for a query for the SOA record in Utopia\DNS\Zone\Resolver::lookup() after the check for zero queries, just before selecting the best matching records.

// Return the zone's SOA record
if (($question->type === Record::TYPE_SOA) && ($question->name === $zone->name) {
	return Message::response(
		header: $query->header,
		responseCode: Message::RCODE_NOERROR,
		questions: $query->questions,
		answers: [$zone->soa],
		authoritative: true,
		recursionAvailable: false
	);
}

Dominant language
PHP
Stars
9
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.