Skip to content

Commit

Permalink
[Web] Fix potential XSS in autodiscover-json.php
Browse files Browse the repository at this point in the history
  • Loading branch information
andryyy committed Sep 7, 2021
1 parent 80fc18c commit 8e736ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/web/autodiscover-json.php
Expand Up @@ -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"}';
}
?>

0 comments on commit 8e736ba

Please sign in to comment.