mirror of
https://github.com/24eme/signaturepdf
synced 2024-05-21 15:16:37 +02:00
small adjustments
This commit is contained in:
parent
47ef75562f
commit
a321c5427a
4
app.php
4
app.php
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue