Skip to content
Snippets Groups Projects
Verified Commit f9f340fe authored by Damien's avatar Damien
Browse files

FIX #16699 TIME 0:45 Check tmp and docserver path

parent b2e30774
No related branches found
No related tags found
No related merge requests found
......@@ -264,17 +264,15 @@ class CertificateSignatureController
DigitalSignatureController::terminate(['config' => $config, 'transactionId' => $document['digital_signature_transaction_id']]);
}
// if (!empty($storeInfos['errors'])) {
// return ['errors' => $storeInfos['errors']];
// }
if ($args['lastStep']) {
$storeInfos = DocserverController::storeResourceOnDocServer([
'encodedFile' => base64_encode(file_get_contents($signedDocumentPath)),
'format' => 'pdf',
'docserverType' => 'ESIGN'
]);
if (!empty($storeInfos['errors'])) {
return ['errors' => $storeInfos['errors']];
}
AdrModel::deleteDocumentAdr([
'where' => ['main_document_id = ?', 'type = ?'],
......
......@@ -1235,6 +1235,9 @@ class DocumentController
ValidatorModel::stringType($args, ['path']);
$tmpPath = CoreConfigModel::getTmpPath();
if (!is_dir($tmpPath)) {
return ['errors' => 'Tmp path is not valid'];
}
$tmpFilename = $tmpPath . $GLOBALS['id'] . '_' . rand() . 'adr.pdf';
copy($args['path'], $tmpFilename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment