Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Fix deprecated function. closes #3349
Browse files Browse the repository at this point in the history
  • Loading branch information
ddurieux committed Jun 20, 2022
1 parent 545555f commit 4064c77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/deploycommon.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
*
*/

use Glpi\Toolbox\Sanitizer;

if (!defined('GLPI_ROOT')) {
die("Sorry. You can't access directly to this file");
}
Expand Down Expand Up @@ -325,6 +327,7 @@ function prepareRun($taskjob_id, $definitions_filter = null) {
* @return array
*/
function run($taskjobstate) {
global $DB;

//Check if the job has been postponed
if (!is_null($taskjobstate->fields['date_start'])
Expand Down Expand Up @@ -389,7 +392,7 @@ function run($taskjobstate) {
if (isset($order_job['actions'])) {
foreach ($order_job['actions'] as $key => $value) {
if (isset($value['cmd']) && isset($value['cmd']['exec'])) {
$order_job['actions'][$key]['cmd']['exec']= Toolbox::unclean_cross_side_scripting_deep($value['cmd']['exec']);
$order_job['actions'][$key]['cmd']['exec']= $DB->escape(Sanitizer::decodeHtmlSpecialChars($value['cmd']['exec']));
}
}
}
Expand Down

0 comments on commit 4064c77

Please sign in to comment.