|
@@ -33,7 +33,9 @@ if (isset($_POST['zone']) AND isset($_SESSION['username'])) {
|
|
|
|
|
|
$zoneContent = file_get_contents(KNOT_ZONES_PATH . "/" . $_POST['zone'] . "zone");
|
|
|
|
|
|
- preg_match("#\n" . preg_quote($_POST['zone']) . "\s+0\s+CDS\s+([0-9]{1,5})\s+([0-9]{1,2})\s+([0-9])\s+([0-9A-F]{64})\n#", $zoneContent, $matches);
|
|
|
+ $found = preg_match("#\n" . preg_quote($_POST['zone']) . "\s+0\s+CDS\s+([0-9]{1,5})\s+([0-9]{1,2})\s+([0-9])\s+([0-9A-F]{64})\n#", $zoneContent, $matches);
|
|
|
+ if ($found !== 1)
|
|
|
+ exit("ERROR: Unable to get public key record from zone file");
|
|
|
|
|
|
$tag = $matches[1];
|
|
|
$algo = $matches[2];
|