Skip to content

Commit

Permalink
HOME gpg env on tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Jul 30, 2024
1 parent 5b3259e commit 618a6eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/cryptography.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function decrypt() {
return false;
}
$decryptFolder = sys_get_temp_dir()."/".uniqid('pdfsignature.decrypted.'.getmypid(), true);
putenv('HOME='.$decryptFolder);
putenv('HOME='.sys_get_temp_dir());
mkdir($decryptFolder);
foreach ($this->getFiles(true) as $file) {
$outputFile = $decryptFolder."/".str_replace(".gpg", "", basename($file));
Expand Down Expand Up @@ -77,9 +77,6 @@ public static function hardUnlink($element) {
foreach (glob($element.'/*') as $file) {
self::hardUnlink($file);
}
foreach (glob($element.'/.*') as $file) {
self::hardUnlink($file);
}
rmdir($element);
return;
}
Expand Down

0 comments on commit 618a6eb

Please sign in to comment.