Skip to content

Commit

Permalink
fix(import): carriage return
Browse files Browse the repository at this point in the history
  • Loading branch information
Rom1-B authored Sep 14, 2022
1 parent fa2c5ba commit cf2a322
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/commoninjectionlib.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* -------------------------------------------------------------------------
*/

use Glpi\Toolbox\Sanitizer;

class PluginDatainjectionCommonInjectionLib
{

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')) {
Expand Down

0 comments on commit cf2a322

Please sign in to comment.