Skip to content

fix: Fix domain validation not allowing for PTR DNS records#7048

Merged
CommanderStorm merged 3 commits intolouislam:masterfrom
appfactorysrl:fix/dns-ptr-records
Mar 1, 2026
Merged

fix: Fix domain validation not allowing for PTR DNS records#7048
CommanderStorm merged 3 commits intolouislam:masterfrom
appfactorysrl:fix/dns-ptr-records

Conversation

@sgdc3
Copy link
Copy Markdown
Contributor

@sgdc3 sgdc3 commented Feb 25, 2026

Summary

This PR fixes an issue in the DNS monitoring entry form validation where IP addresses were incorrectly marked as invalid.

While domain names are required for most DNS record types, PTR records require IP addresses as lookup keys. The validation has been updated to allow IP addresses when the record type is PTR, while keeping domain validation for other record types.

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 Any UI changes adhere to visual style of this project.
  • 🛠️ I have self-reviewed and self-tested my code to ensure it works as expected.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🧰 Dependency updates are listed and explained.
  • ⚠️ CI passes and is green.

@github-actions
Copy link
Copy Markdown
Contributor

Hello and thanks for lending a paw to Uptime Kuma! 🐻👋
As this is your first contribution, please be sure to check out our Pull Request guidelines.
In particular: - Mark your PR as Draft while you’re still making changes - Mark it as Ready for review once it’s fully ready
If you have any design or process questions, feel free to ask them right here in this pull request - unclear documentation is a bug too.

@autofix-ci
Copy link
Copy Markdown
Contributor

autofix-ci bot commented Feb 25, 2026

Hi! I'm autofix logoautofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests.

I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:

  1. Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
  2. Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).

@CommanderStorm
Copy link
Copy Markdown
Collaborator

Could you give an exaple and preferably add it as a testcase?
We don't have any code coverage of PTR DNS types, so this will likely fail in the future at some point.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Feb 25, 2026

This is the error message displayed when I try to add a monitor to check the reverse DNS (PTR record) for an IPv4 address (8.8.8.8 in this case):
image

@CommanderStorm CommanderStorm changed the title fix: Fix domain validation for PTR DNS records fix: Fix domain validation not allowing for PTR DNS records Feb 26, 2026
@CommanderStorm CommanderStorm enabled auto-merge (squash) February 26, 2026 17:57
@CommanderStorm CommanderStorm enabled auto-merge (squash) February 26, 2026 18:19
@CommanderStorm
Copy link
Copy Markdown
Collaborator

CommanderStorm commented Feb 26, 2026

@sgdc3
you don't allow edits by maintainers.
We require this to be up to date with master -> pleae merge with it yourself.
We can merge into master afterwards.

@CommanderStorm CommanderStorm added this to the 2.2.0 milestone Feb 26, 2026
@CommanderStorm CommanderStorm added the pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again label Feb 27, 2026
@CommanderStorm CommanderStorm marked this pull request as draft February 27, 2026 19:46
auto-merge was automatically disabled February 27, 2026 19:46

Pull request was converted to draft

@sgdc3 sgdc3 marked this pull request as ready for review March 1, 2026 23:24
@github-actions github-actions bot added the pr:needs review this PR needs a review by maintainers or other community members label Mar 1, 2026
@CommanderStorm CommanderStorm merged commit 2c6dcbb into louislam:master Mar 1, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:needs review this PR needs a review by maintainers or other community members pr:please resolve merge conflict A merge-conflict needs to be addressed before reviewing makes sense again

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants