Add anti-CSRF token

phpcs-errors:238 phpunit-status:successful
This commit is contained in:
2020-07-03 16:41:31 +02:00
committed by Stefan Rohde-Enslin
parent 5af012ba8b
commit 9d73a9b61e
3 changed files with 45 additions and 6 deletions

View File

@ -3,8 +3,12 @@ declare(strict_types = 1);
require_once __DIR__ . "/functions/functions.php";
$target = "csv/";
$target .= basename( $_FILES['uploaded']['name']);
$targetpart = basename( $_FILES['uploaded']['name']);
$target .= basename($_FILES['uploaded']['name']);
$targetpart = basename($_FILES['uploaded']['name']);
if (validateAntiCsrfToken() === false) {
throw new WrongCsrfTokenException();
}
//This is our size condition
if ($uploaded_size > 40000000) {