Skip to content

Commit

Permalink
Merge pull request #4319 from LibreSign/backport/4311/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: When only have a signature, consider that who signed is who need…
  • Loading branch information
vitormattos authored Jan 15, 2025
2 parents e4703fb + 18c5c15 commit 9ad6ec6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,14 @@ private function loadLibreSignSigners(): void {
if (!empty($found)) {
$index = key($found);
} else {
$index = count($this->fileData->signers);
$totalSigners = count($signers);
$totalCert = count($this->certData);
// When only have a signature, consider that who signed is who need to sign
if ($totalCert === 1 && $totalSigners === $totalCert) {
$index = 0;
} else {
$index = count($this->fileData->signers);
}
}
} else {
$index = 0;
Expand Down

0 comments on commit 9ad6ec6

Please sign in to comment.