--- a/inc/dns.inc.php Thu Jul 24 17:21:33 2008 +0000
+++ b/inc/dns.inc.php Thu Aug 07 18:45:13 2008 +0000
@@ -230,8 +230,8 @@
$query = "SELECT type, content
FROM records
- WHERE content = " . $db->quote($name) . "
- AND (type = 'MX' OR type = 'NS')";
+ WHERE content = " . $db->quote($name, 'text') . "
+ AND (type = ".$db->quote('MX', 'text')." OR type = ".$db->quote('NS', 'text').")";
$response = $db->query($query);
if (PEAR::isError($response)) { error($response->getMessage()); return false; };
@@ -248,8 +248,8 @@
$query = "SELECT type, name
FROM records
- WHERE name = " . $db->quote($target) . "
- AND TYPE = 'CNAME'";
+ WHERE name = " . $db->quote($target, 'text') . "
+ AND TYPE = ".$db->quote('CNAME', 'text');
$response = $db->query($query);
if (PEAR::isError($response)) { error($response->getMessage()); return false; };