Skip to content
Snippets Groups Projects
Commit 46238517 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Make errorreport.php verify the format of report IDs

parent f4f12106
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,10 @@ $reportId = $_REQUEST['reportId']; ...@@ -17,6 +17,10 @@ $reportId = $_REQUEST['reportId'];
$email = $_REQUEST['email']; $email = $_REQUEST['email'];
$text = $_REQUEST['text']; $text = $_REQUEST['text'];
if (!preg_match('/^[0-9a-f]{8}$/', $reportId)) {
throw new \SimpleSAML\Error\Exception('Invalid reportID');
}
$data = null; $data = null;
try { try {
$session = \SimpleSAML\Session::getSessionFromRequest(); $session = \SimpleSAML\Session::getSessionFromRequest();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment