diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-03 10:14:37 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-03 10:14:37 +0200 |
commit | 1588a927a8f4cd458e673a15ddb9bdb12b0b90af (patch) | |
tree | b06bcff609c84ca1e895ebe694e5bb1932b01cff /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets | |
parent | bd578666b3bafbd6a197b3374f3fafea295bf937 (diff) | |
download | pdf-as-3-1588a927a8f4cd458e673a15ddb9bdb12b0b90af.tar.gz pdf-as-3-1588a927a8f4cd458e673a15ddb9bdb12b0b90af.tar.bz2 pdf-as-3-1588a927a8f4cd458e673a15ddb9bdb12b0b90af.zip |
Fixed filename url encoding error
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java | 5 |
1 files changed, 3 insertions, 2 deletions
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$
}
|