mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
notify: Do not pass notification texts via pipes
Directly retrieve comments from the database instead of additionally passing them via stdin. Fixes FS#46742. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
5931d5ceec
commit
e45609cf66
4 changed files with 30 additions and 12 deletions
|
@ -1277,11 +1277,10 @@ function account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints) {
|
|||
* Invoke the email notification script.
|
||||
*
|
||||
* @param string $params Command line parameters for the script.
|
||||
* @param string $text Text to pass via stdin.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function notify($params, $text='') {
|
||||
function notify($params) {
|
||||
$cmd = config_get('notifications', 'notify-cmd');
|
||||
foreach ($params as $param) {
|
||||
$cmd .= ' ' . escapeshellarg($param);
|
||||
|
@ -1299,7 +1298,6 @@ function notify($params, $text='') {
|
|||
return false;
|
||||
}
|
||||
|
||||
fwrite($pipes[0], $text);
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue