session directory prefix; reset.php made saver. (isues #17 and #16)

This commit is contained in:
Fabian de Boer 2026-07-19 20:17:37 +02:00
commit 186d770741
3 changed files with 80 additions and 26 deletions

View file

@ -85,9 +85,10 @@ function testImgSearch() {
return;
}
$folder = ZAP_APP_BASE_DIR . DIRECTORY_SEPARATOR . ZAP_SESSIONS_DIR . DIRECTORY_SEPARATOR . 'search_test_' . ZAP_MOMENT;
$suffix = bin2hex(random_bytes(4));
$folder = ZAP_APP_BASE_DIR . DIRECTORY_SEPARATOR . ZAP_SESSIONS_DIR . DIRECTORY_SEPARATOR . 'search_test_' . ZAP_MOMENT . '_' . $suffix;
if (!is_dir($folder)) {
@mkdir($folder, 0777, true);
mkdir($folder, 0777, true);
}
echo "\nQuery: '$word'\n\n";