[PR #2246] [MERGED] Recursor::resolve: reject queries with relative domain names #2909

Closed
opened 2026-03-16 11:14:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2246
Author: @japaric
Created: 6/17/2024
Status: Merged
Merged: 7/2/2024
Merged by: @djc

Base: mainHead: ja-gh2237


📝 Commits (1)

  • 30e81dc Recursor::resolve: reject queries with relative domain names

📊 Changes

1 file changed (+19 additions, -0 deletions)

View changed files

📝 crates/recursor/src/recursor.rs (+19 -0)

📄 Description

fixes #2237

this adds a runtime check but it might be worthwhile to add a FQDN newtype over that Name that holds the invariant of being fully qualified. the NAME field in all parsed queries will have type FQDN. the Recursor::resolve can then require that FQDN type to ensure it's never given a relative domain name


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2246 **Author:** [@japaric](https://github.com/japaric) **Created:** 6/17/2024 **Status:** ✅ Merged **Merged:** 7/2/2024 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `ja-gh2237` --- ### 📝 Commits (1) - [`30e81dc`](https://github.com/hickory-dns/hickory-dns/commit/30e81dcab51bb390a17889bf3b956b15cab7062b) Recursor::resolve: reject queries with relative domain names ### 📊 Changes **1 file changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/recursor/src/recursor.rs` (+19 -0) </details> ### 📄 Description fixes #2237 this adds a runtime check but it might be worthwhile to add a `FQDN` newtype over that `Name` that holds the invariant of being fully qualified. the NAME field in all parsed queries will have type `FQDN`. the `Recursor::resolve` can then require that `FQDN` type to ensure it's never given a relative domain name --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:14:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2909
No description provided.