1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-21 15:16:37 +02:00

small adjustments

This commit is contained in:
Tanguy Le Faucheur 2023-11-20 09:58:22 +01:00
parent 47ef75562f
commit a321c5427a
2 changed files with 6 additions and 3 deletions

View file

@ -243,7 +243,9 @@ $f3->route('POST /share',
$symmetricKey = $_COOKIE[$hash];
$encryptor = new CryptographyClass($_COOKIE[$hash], $f3->get('PDF_STORAGE_PATH').$hash);
$encryptor->encrypt();
if (!$encryptor->encrypt()) {
$f3->error(403);
};
$f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature/'.$hash."#sk:".$symmetricKey);

View file

@ -29,9 +29,10 @@ class CryptographyClass
$result = shell_exec($command);
if ($result === false) {
echo "Cypher failure";
exit;
return $result;
}
$this->hardUnlink($file);
return $result;
}
}
@ -46,7 +47,7 @@ class CryptographyClass
}
$this->hardUnlink($file);
}
return true;
return $result;
}
public static function hardUnlink($element) {