From 57b8d8d973f49882f8f359a9c4fb2ffb8959337a Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 11 Nov 2021 09:28:13 +0100 Subject: [PATCH] Utilisation de la fonction tempnam pour les noms de fichier de l'action image2svg --- app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.php b/app.php index 9a74e09..23cc614 100644 --- a/app.php +++ b/app.php @@ -85,9 +85,9 @@ $f3->route('POST /image2svg', } return true; - }, true, function($fileBaseName, $formFieldName) { + }, true, function($fileBaseName, $formFieldName) use ($f3) { - return substr(hash('sha256', $fileBaseName.uniqid().mt_rand()), 0, 24).strrchr($fileBaseName, '.'); + return basename(tempnam($f3->get('UPLOADS'), 'pdfsignature_image2svg')); }); $imageFile = null;