We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b115572 commit a1e7034Copy full SHA for a1e7034
1 file changed
interface/web/dns/dns_import.php
@@ -216,7 +216,7 @@
216
$line = trim($line);
217
if ($line != '' && substr($line, 0, 1) != ';'){
218
if(strpos($line, ";") !== FALSE) {
219
- if (!preg_match("/v=DKIM|v=DMARC/",$line)) {
+ if(!preg_match("/\"[^\"]+;[^\"]*\"/", $line)) {
220
$line = substr($line, 0, strpos($line, ";"));
221
}
222
@@ -267,12 +267,13 @@
267
$parts = explode(' ', $line);
268
269
// make elements lowercase
270
- $dkim=@($parts[3]=='"v=DKIM1;')?true:false;
271
- $dmarc=@($parts[3]=='"v=DMARC1;')?true:false;
272
-
273
$new_parts = array();
274
foreach($parts as $part){
275
- if(!$dkim && !$dmarc) {
+ if(
+ (strpos($part, ';') === false) &&
+ (!preg_match("/^\"/", $part)) &&
+ (!preg_match("/\"$/", $part))
276
+ ) {
277
$new_parts[] = strtolower($part);
278
} else {
279
$new_parts[] = $part;
0 commit comments