dns/dyndns: patch this spot

PR: https://github.com/opnsense/plugins/issues/2666
This commit is contained in:
Franco Fichtner
2021-11-25 13:10:54 +01:00
parent 41ae6236de
commit 4b3abbf546
@@ -1499,7 +1499,8 @@ class updatedns
}
break;
case 'namecheap':
$tmp = str_replace("^M", "", $data);
/* technically this is wrong but proves a point about the document being broken remotely */
$tmp = preg_replace('/(\<\?xml[^?]+?encoding=.?)utf-16([^?]+?\?\>)/i', '$1utf-8$2', $data);
$ncresponse = simplexml_load_string($tmp);
if (preg_match("/internal server error/i", $data)) {
$status = "Dynamic DNS: (Error) Server side error.";