diff --git a/data/web/autodiscover-json.php b/data/web/autodiscover-json.php index e1749b7518..2fa96990eb 100644 --- a/data/web/autodiscover-json.php +++ b/data/web/autodiscover-json.php @@ -16,6 +16,6 @@ } else { http_response_code(400); - echo '{"ErrorCode":"InvalidProtocol","ErrorMessage":"The given protocol value \u0027' . $_GET['Protocol'] . '\u0027 is invalid. Supported values are \u0027ActiveSync,AutodiscoverV1\u0027"}'; + echo '{"ErrorCode":"InvalidProtocol","ErrorMessage":"The given protocol value \u0027' . preg_replace("/[^\da-z]/i", '', $_GET['Protocol']) . '\u0027 is invalid. Supported values are \u0027ActiveSync,AutodiscoverV1\u0027"}'; } ?>