equal
deleted
inserted
replaced
228 function is_valid_rr_cname_name($name) { |
228 function is_valid_rr_cname_name($name) { |
229 global $db; |
229 global $db; |
230 |
230 |
231 $query = "SELECT type, content |
231 $query = "SELECT type, content |
232 FROM records |
232 FROM records |
233 WHERE content = " . $db->quote($name) . " |
233 WHERE content = " . $db->quote($name, 'text') . " |
234 AND (type = 'MX' OR type = 'NS')"; |
234 AND (type = ".$db->quote('MX', 'text')." OR type = ".$db->quote('NS', 'text').")"; |
235 |
235 |
236 $response = $db->query($query); |
236 $response = $db->query($query); |
237 if (PEAR::isError($response)) { error($response->getMessage()); return false; }; |
237 if (PEAR::isError($response)) { error($response->getMessage()); return false; }; |
238 |
238 |
239 if ($response->numRows() > 0) { |
239 if ($response->numRows() > 0) { |
246 function is_valid_non_alias_target($target) { |
246 function is_valid_non_alias_target($target) { |
247 global $db; |
247 global $db; |
248 |
248 |
249 $query = "SELECT type, name |
249 $query = "SELECT type, name |
250 FROM records |
250 FROM records |
251 WHERE name = " . $db->quote($target) . " |
251 WHERE name = " . $db->quote($target, 'text') . " |
252 AND TYPE = 'CNAME'"; |
252 AND TYPE = ".$db->quote('CNAME', 'text'); |
253 |
253 |
254 $response = $db->query($query); |
254 $response = $db->query($query); |
255 if (PEAR::isError($response)) { error($response->getMessage()); return false; }; |
255 if (PEAR::isError($response)) { error($response->getMessage()); return false; }; |
256 if ($response->numRows() > 0) { |
256 if ($response->numRows() > 0) { |
257 error(ERR_DNS_NON_ALIAS_TARGET); return false; |
257 error(ERR_DNS_NON_ALIAS_TARGET); return false; |