Fix bug in crsf token handling

phpcs-errors:238 phpunit-status:successful
This commit is contained in:
2020-07-03 17:54:40 +02:00
committed by Stefan Rohde-Enslin
parent c8cce85893
commit ef638ee9c4
2 changed files with 12 additions and 7 deletions

View File

@ -6,6 +6,10 @@ $target = "csv/";
$target .= basename($_FILES['uploaded']['name']);
$targetpart = basename($_FILES['uploaded']['name']);
if (session_status() != PHP_SESSION_ACTIVE) {
session_start();
}
if (validateAntiCsrfToken() === false) {
throw new WrongCsrfTokenException();
}