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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 15 + 11 = ?

 
 [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