Project

General

Profile

Bug #23352

Updated by Sven Lueder about 6 years ago

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: 
 <pre> 
   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 

 </pre> 

Back