summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2025-12-28 00:21:29 +0000
committerLuke Bratch <luke@bratch.co.uk>2025-12-28 00:21:29 +0000
commit3ff65d3ee9458b9ae961547a649e94c407e23333 (patch)
treebedc3fdd9902812047c3673779116cb215600dd4
parent82765543fcffabd014fb3df115302102f6ed4c34 (diff)
Ensure that the secret ID is definitely a comment at the end of a non-commented record.
-rw-r--r--dns.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/dns.php b/dns.php
index 1c074c8..95ace68 100644
--- a/dns.php
+++ b/dns.php
@@ -153,7 +153,7 @@ if (isset($_GET['mode']) && isset($_GET['zone']) && isset($_GET['hash'])) {
// Find lines that ended with the hash provided (if any)
$i = 0;
foreach ($zonelines as $line) {
- if (preg_match("/" . $_GET['hash'] . "$/", $line)) {
+ if (preg_match("/^[^;].*;.*" . $_GET['hash'] . "$/", $line)) {
array_push($matches, array($i, $line));
}
$i++;