diff --git a/encoder/request_cert.php b/encoder/request_cert.php index 8a11cef..4844398 100755 --- a/encoder/request_cert.php +++ b/encoder/request_cert.php @@ -60,6 +60,7 @@ $staging = ($_POST['staging'] ?? "0") === "1" ? 1 : 0; // Validation helpers function valid_domain_name($d) { + $d = trim($d); // important! return (bool) preg_match( '/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/i', $d