mirror of
https://github.com/24eme/signaturepdf
synced 2024-06-03 06:22:13 +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];
|
$symmetricKey = $_COOKIE[$hash];
|
||||||
$encryptor = new CryptographyClass($_COOKIE[$hash], $f3->get('PDF_STORAGE_PATH').$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);
|
$f3->reroute($f3->get('REVERSE_PROXY_URL').'/signature/'.$hash."#sk:".$symmetricKey);
|
||||||
|
|
|
@ -29,9 +29,10 @@ class CryptographyClass
|
||||||
$result = shell_exec($command);
|
$result = shell_exec($command);
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
echo "Cypher failure";
|
echo "Cypher failure";
|
||||||
exit;
|
return $result;
|
||||||
}
|
}
|
||||||
$this->hardUnlink($file);
|
$this->hardUnlink($file);
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ class CryptographyClass
|
||||||
}
|
}
|
||||||
$this->hardUnlink($file);
|
$this->hardUnlink($file);
|
||||||
}
|
}
|
||||||
return true;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function hardUnlink($element) {
|
public static function hardUnlink($element) {
|
||||||
|
|
Loading…
Reference in a new issue