From e49eb5e433767386a09732f5942b6425098b511b Mon Sep 17 00:00:00 2001 From: emusic Date: Wed, 21 Mar 2018 13:06:24 +0100 Subject: changes regarding protection, bug fix, thread safe --- .../java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java index 4ec8021d..07fb7d65 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java @@ -171,6 +171,9 @@ public class ExternSignServlet extends HttpServlet { try { byte[] filecontent = null; + + + // checks if the request actually contains upload file if (!ServletFileUpload.isMultipartContent(request)) { // No Uploaded data! @@ -181,6 +184,12 @@ public class ExternSignServlet extends HttpServlet { throw new PdfAsWebException("No Signature data defined!"); } } else { + + + //takes placeholder id if exist + //if(request.getParameter("placeholder_id")!=null && !request.getParameter("placeholder_id").isEmpty()){ + // String placeholder_id = request.getParameter("placeholder_id"); + //} // configures upload settings DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setSizeThreshold(WebConfiguration.getFilesizeThreshold()); @@ -335,6 +344,8 @@ public class ExternSignServlet extends HttpServlet { String locale = PdfAsParameterExtractor.getLocale(request); PdfAsHelper.setLocale(request, response, locale); + + String placeholder_id = PdfAsParameterExtractor.getPlaceholderId(request); String filename = PdfAsParameterExtractor.getFilename(request); if(filename != null) { -- cgit v1.2.3