cant decode uri :(

This commit is contained in:
2025-02-06 00:18:36 +01:00
parent b03c6a42ae
commit e2239d3894
6 changed files with 124 additions and 99 deletions

23
rm.php Normal file
View File

@ -0,0 +1,23 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
include_once 'config.php';
$fileNameRegex = '/^[0-9a-zA-Z-_. ]+$/';
$name = filter_input(INPUT_GET, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $fileNameRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if (!$name) {
die("Paramètre manquant ou incorrect : name");
}
$path = "$SCANSDIR/$name.xml";
if (!file_exists($path)) {
die("Scan inconnu : $name");
}
unlink($path);
header('Location: .');