Skip to content

Commit 0e1c232

Browse files
author
mcramer
committed
Fixed: Input was not checked because of added dot (never was empty)
1 parent a733353 commit 0e1c232

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interface/web/dns/dns_soa_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ function onSubmit() {
128128
$this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]);
129129

130130
//* Check if soa, ns and mbox have a dot at the end
131-
if(substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.';
132-
if(substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.';
133-
if(substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.';
131+
if(strlen($this->dataRecord["origin"]) > 0 && substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.';
132+
if(strlen($this->dataRecord["ns"]) > 0 && substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.';
133+
if(strlen($this->dataRecord["mbox"]) > 0 && substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.';
134134

135135
//* Replace @ in mbox
136136
if(stristr($this->dataRecord["mbox"],'@')) {

0 commit comments

Comments
 (0)