Skip to content
Snippets Groups Projects
Commit 865130fa authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'patch-php-sess-tmp-safe-exec' into 'stable-3.1'

Fix exec to exec_safe to make placeholder work again, #5434 #5510

See merge request !946
parents a25de6fe 4b281bf7
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ class cronjob_logfiles extends cronjob {
foreach($records as $rec){
$tmp_path = realpath($rec['document_root'].'/tmp');
if($tmp_path != '' && strlen($tmp_path) > 10 && is_dir($tmp_path) && $app->system->is_user($rec['system_user'])){
exec("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
$app->system->exec_safe("cd ?; find . -mtime +1 -name 'sess_*' | grep -v -w .no_delete | xargs rm > /dev/null 2> /dev/null", $tmp_path);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment