diff options
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/web')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java index 341b97c..f9cb809 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java @@ -22,6 +22,7 @@ import at.gv.egiz.pdfas.impl.output.ByteArrayDataSink; import at.gv.egiz.pdfas.impl.output.FileBasedDataSink;
import at.gv.egiz.pdfas.web.SignSessionInformation;
import at.knowcenter.wag.egov.egiz.PdfASID;
+import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException;
import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
import at.knowcenter.wag.egov.egiz.framework.signators.DetachedSignator_1_0_0;
import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory;
@@ -109,6 +110,11 @@ public class SignServletHelper {
log.debug("finishSign:"); //$NON-NLS-1$
+ // check if document is empty
+ if (si.si.getSignatureData() == null || si.si.getSignatureData().getDataSource().getLength() == 0) {
+ throw new PDFDocumentException(250, "The document is empty.");
+ }
+
log.debug("connector = " + si.connector); //$NON-NLS-1$
if (ConnectorFactory.isConnectorLocal(si.connector))
{
|