--- a/edit.php Fri Nov 14 14:43:52 2008 +0100
+++ b/edit.php Fri Nov 14 14:51:47 2008 +0100
@@ -126,7 +126,7 @@
}
echo " </select>\n";
echo " </td>\n";
- echo " <td class=\"u\"><input class=\"wide\" name=\"record[" . $r['id'] . "][content]\" value=\"" . $r['content'] . "\"></td>\n";
+ echo " <td class=\"u\"><input class=\"wide\" name=\"record[" . $r['id'] . "][content]\" value=\"" . ereg_replace( "\"",""", $r['content']) . "\"></td>\n";
if ($r['type'] == "MX") {
echo " <td class=\"u\"><input name=\"record[" . $r['id'] . "][prio]\" value=\"" . $r['prio'] . "\"></td>\n";
} else {
--- a/inc/dns.inc.php Fri Nov 14 14:43:52 2008 +0100
+++ b/inc/dns.inc.php Fri Nov 14 14:51:47 2008 +0100
@@ -270,7 +270,7 @@
}
for ($i = 0; ($i < 2); $i++) {
- if (!preg_match("/^([^\s]{1,1000}|\"([^\"]{1,998}\")$/i", $fields[$i])) {
+ if (!preg_match("/^([^\s]{1,1000}|\"([^\"]{1,998}\"))$/i", $fields[$i])) {
error(ERR_DNS_HINFO_INV_CONTENT); return false;
}
}
--- a/inc/record.inc.php Fri Nov 14 14:43:52 2008 +0100
+++ b/inc/record.inc.php Fri Nov 14 14:51:47 2008 +0100
@@ -125,7 +125,7 @@
$query = "UPDATE records
SET name=".$db->quote($record['name'], 'text').",
type=".$db->quote($record['type'], 'text').",
- content=" . $db->quote($record['content'], 'text') . ",
+ content=" . $db->quote(addslashes($record['content']), 'text') . ",
ttl=".$db->quote($record['ttl'], 'integer').",
prio=".$db->quote($record['prio'], 'integer').",
change_date=".$db->quote(time(), 'integer')."