From 1588a927a8f4cd458e673a15ddb9bdb12b0b90af Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 3 Oct 2014 10:14:37 +0200 Subject: Fixed filename url encoding error --- .../src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pdf-as-web') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java index 6cb55fe..dce16b7 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java @@ -36,6 +36,7 @@ import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.net.URLEncoder; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Iterator; @@ -265,7 +266,7 @@ public class SignServlet extends HttpServlet { // if we already have parameters "&" must be used instead of "?" String paramSeparator = (pdf_url.indexOf("?") != -1) ? "&" : "?"; - String query = pdf_url + "/" + filename + paramSeparator + String query = pdf_url + "/" + URLEncoder.encode(filename, "UTF-8") + paramSeparator + FormFields.FIELD_PDF_ID + "=" + pdf_id; // query = pdf_url; @@ -728,7 +729,7 @@ public class SignServlet extends HttpServlet { } continue; } - + throw new ServletException("Unrecognized POST data."); //$NON-NLS-1$ } -- cgit v1.2.3