From cf2a3226445d24c95afb3a6f6b3fcc7dcf45d243 Mon Sep 17 00:00:00 2001 From: Romain B <8530352+Rom1-B@users.noreply.github.com> Date: Wed, 14 Sep 2022 12:51:59 +0200 Subject: [PATCH] fix(import): carriage return --- inc/commoninjectionlib.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 1337b5cd..32a14043 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -28,6 +28,8 @@ * ------------------------------------------------------------------------- */ +use Glpi\Toolbox\Sanitizer; + class PluginDatainjectionCommonInjectionLib { @@ -1369,7 +1371,7 @@ public function processAddOrUpdate() { $add = true; $accepted = false; - $this->values = Toolbox::stripslashes_deep($this->values); + $this->values = Sanitizer::dbUnescapeRecursive($this->values); //Toolbox::logDebug("processAddOrUpdate(), start with", $this->values); // Initial value, will be change when problem @@ -1567,7 +1569,7 @@ private function effectiveAddOrUpdate($injectionClass, $item, $values, $add = tr } } - $toinject = Toolbox::addslashes_deep($toinject); + $toinject = Sanitizer::dbEscapeRecursive($toinject); $newID = null; if (method_exists($injectionClass, 'customimport')) {