From a90e31be4f9cbd39d86b12657dbf1a2dc221f498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Fri, 18 Mar 2022 14:03:36 +0100 Subject: [PATCH] Fix credential storing with spaces --- .../include/class/CredentialStore.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/CredentialStore.class.php b/pandora_console/include/class/CredentialStore.class.php index 82ab94ee97..5919eef8f0 100644 --- a/pandora_console/include/class/CredentialStore.class.php +++ b/pandora_console/include/class/CredentialStore.class.php @@ -14,7 +14,7 @@ * |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| * * ============================================================================ - * Copyright (c) 2005-2021 Artica Soluciones Tecnologicas + * Copyright (c) 2005-2022 Artica Soluciones Tecnologicas * Please see http://pandorafms.org for full contribution list * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -644,8 +644,15 @@ class CredentialStore extends Wizard ]; // Spaces are not allowed. - $values['identifier'] = preg_replace('/\s+/', '-', trim($identifier)); - + $values['identifier'] = \io_safe_input( + preg_replace( + '/\s+/', + '-', + trim( + \io_safe_output($identifier) + ) + ) + ); return $values; }