Skip to content

Commit

Permalink
feat: Do not sign secured document
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos authored and backportbot-libresign[bot] committed Apr 23, 2024
1 parent 3506ba1 commit 4abbc71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Service/PdfParserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public function getMetadata(File $node): array {
try {
$output = $this->parsePdfOnlyWithPhp($tempFile);
} catch (\Throwable $th) {
if ($th->getMessage() === 'Secured pdf file are currently not supported.') {
throw new LibresignException('Secured pdf file are currently not supported.');
}
$this->logger->error('Impossible get metadata from this file: ' . $th->getMessage());
throw new LibresignException('Impossible get metadata from this file.');
}
Expand Down

0 comments on commit 4abbc71

Please sign in to comment.