Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.7

Bug #18242 ddns creation of TXT records truncates to last word
Submitted: 2011-02-05 01:00 UTC
From: dundakitty Assigned:
Status: Open Package: Net_DNS (version 1.0.7)
PHP Version: 5.2.12 OS: Redhat ES 3.0
Roadmaps: (Not assigned)    
Subscription  


 [2011-02-05 01:00 UTC] dundakitty (Mike Mitchell)
Description: ------------ When creating TXT records, the rdata field is truncated to just the last word. Adding double quotes around the data passes the string through, but now the data packet includes the double quotes. The problem is with the preg_match statement at line 62 of TXT.php. I don't understand the purpose of the preg_match. Wouldn't a 'trim()' call be sufficient? Test script: --------------- <?php require_once('Net/DNS.php'); $zone = 'sasinstitute.net'; $nm = 'ddns-test.' . $zone; $rd = 'v=spf1 mx ip4:192.35.83.16/28 -all'; $rr = &Net_DNS_RR::factory("$nm 3600 IN TXT $rd"); $rr->display(); ?> Expected result: ---------------- Entire rdata field is present: ddns-test.sasinstitute.net. 3600 IN TXT "v=spf1 mx ip4:192.35.83.16/28 -all" Actual result: -------------- rdata is trunctated to the last word: ddns-test.sasinstitute.net. 3600 IN TXT "-all"

Comments