PHP Classes
elePHPant
Icontem

TXT-records without quotes

Recommend this page to a friend!

      PHP Bind Zone File Parser  >  All threads  >  TXT-records without quotes  >  (Un) Subscribe thread alerts  
Subject:TXT-records without quotes
Summary:TXT-records without quotes don't get read
Messages:1
Author:Pascal Nobus
Date:2020-02-05 18:03:12
 

 


  1. TXT-records without quotes   Reply   Report abuse  
Pascal Nobus - 2020-02-05 18:03:12
If there's a TXT-record in the zone that doesn't use quotes (like MS or google-verificiation records), only the first character of the value is returned.

Patch.
Remove line 210:
$record['data'] = substr($record['data'], 0, strrpos($record['data'], '"')+1); // strip everything after the last "

Replace it with these 4 lines:
if (preg_match('/"/',$record['data']))
$record['data'] = substr($record['data'], 0, strrpos($record['data'], '"')+1); // strip everything after the last "
else
$record['data'] = $record['data'];