|
|
|
@ -168,12 +168,12 @@ class Utils {
@@ -168,12 +168,12 @@ class Utils {
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(filter_var($data, FILTER_VALIDATE_DOMAIN) !== false && preg_match('/\.i2p$/', $data)) { |
|
|
|
|
return true; |
|
|
|
|
if(filter_var($data, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false || !preg_match('/\.i2p$/', $data)) { |
|
|
|
|
$result = "Domain is not valid. The label must be less than 63 characters long, contain only alphanumerics or hyphens and end with .i2p."; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$result = "Domain is not valid. Check if you domain label is lesser than 63 chars and it ends with .i2p."; |
|
|
|
|
return false; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static function verifyHostRecord(string $data, &$output): bool { |
|
|
|
|