mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
#208 Block GPG when using open_basedir
This commit is contained in:
parent
fb1c0dd606
commit
25d946b873
1 changed files with 16 additions and 14 deletions
|
|
@ -1381,6 +1381,7 @@ class GPG
|
||||||
|
|
||||||
private static function findBinary($name) : ?string
|
private static function findBinary($name) : ?string
|
||||||
{
|
{
|
||||||
|
if (!\ini_get('open_basedir')) {
|
||||||
$binary = \trim(`which $name`);
|
$binary = \trim(`which $name`);
|
||||||
if ($binary && \is_executable($binary)) {
|
if ($binary && \is_executable($binary)) {
|
||||||
return $binary;
|
return $binary;
|
||||||
|
|
@ -1397,6 +1398,7 @@ class GPG
|
||||||
return $location . $name;
|
return $location . $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue