From 332b6d5ec3e9b62e5305f15fbd365d528ab461ad Mon Sep 17 00:00:00 2001 From: vince Date: Wed, 2 Feb 2022 07:57:53 +0100 Subject: [PATCH] =?UTF-8?q?emp=C3=AAche=20les=20malins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 16c5af6..1b06b3f 100644 --- a/index.php +++ b/index.php @@ -274,7 +274,7 @@ if (!$isConfig and !$supplierIsNew and $hasSupplier) { foreach (['name', 'choice', 'action'] as $field) $item[$field] = filter_var($_REQUEST[$field], FILTER_SANITIZE_STRING); $item['timestamp'] = time(); - $hash = md5(implode([ $item['name'], $item['choice'], ])); + $hash = md5(implode([ trim($item['name']), $item['choice'], ])); $item['hash'] = $hash; $isBeginning = (!file_exists(DATA_FILE) or in_array(filesize(DATA_FILE), [ false, 0 ]));