Project

General

Profile

Actions

Bug #23352

open

Registration of DNS PTR records does not support trailing dots in FQDN

Added by Sven Lueder about 6 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DNS
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I am using Foreman Proxy to register DNS entries using the API.

Issue:
When trying to register a reverse DNS entry (PTR record) I do receive the following error:
Invalid reverse DNS 51.50.168.192.in-addr.arpa.

Solution:
Looking into the code i see that the trailing dots in PTR FQDNs are not permitted, although they should.

The following patch will solve the issue:

  cd /usr/share/foreman-proxy/modules/dns
  patch -p0 dns_api.rb << '@EOF'
*** dns_api.rb  2018-04-03 13:04:42.000000000 +0200
--- dada        2018-04-22 06:17:01.601331980 +0200
***************
*** 79,85 ****

      def validate_reverse_dns_name!(name)
        validate_dns_name!(name)
!       raise Proxy::Dns::Error.new("Invalid reverse DNS #{name}") unless name =~ /\.(in-addr|ip6)\.arpa$/
      end
    end
  end
--- 79,85 ----

      def validate_reverse_dns_name!(name)
        validate_dns_name!(name)
!       raise Proxy::Dns::Error.new("Invalid reverse DNS #{name}") unless name =~ /\.(in-addr|ip6)\.arpa\.?$/
      end
    end
  end
@EOF

Actions #1

Updated by Sven Lueder about 6 years ago

  • Description updated (diff)

Seems as if the text is

Actions #2

Updated by Sven Lueder about 6 years ago

  • Category set to DNS
Actions #3

Updated by Lukas Zapletal about 6 years ago

Thanks a lot, are you planning a PR in https://github.com/theforeman/smart-proxy/pulls? A simple unit test would be required.

Actions #4

Updated by Sven Lueder about 6 years ago

Hi Lukas,

yep, will do so.

Best regards
Sven

Actions

Also available in: Atom PDF