1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Correctly escape shell command in subprocesds service driver

This commit is contained in:
J. King 2019-01-23 09:32:44 -05:00
parent a5049ac646
commit 9120d3b3e3

View file

@ -31,8 +31,8 @@ class Driver implements \JKingWeb\Arsse\Service\Driver {
$pp = []; $pp = [];
while ($this->queue) { while ($this->queue) {
$id = (int) array_shift($this->queue); $id = (int) array_shift($this->queue);
$php = '"'.\PHP_BINARY.'"'; $php = escapeshellarg(\PHP_BINARY);
$arsse = '"'.$_SERVER['argv'][0].'"'; $arsse = escapeshellarg($_SERVER['argv'][0]);
array_push($pp, popen("$php $arsse feed refresh $id", "r")); array_push($pp, popen("$php $arsse feed refresh $id", "r"));
} }
while ($pp) { while ($pp) {