diff options
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java | 1 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java | 23 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java b/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java index 6f67d1d..abe4378 100644 --- a/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java @@ -17,6 +17,7 @@ public final class SettingsHelper public static VerificationFilterParameters readVerificationFilterParametersFromSettings() throws SettingsException
{
boolean binaryOnly = getFlag("binary_only");
+ // TODO: tknall: typo should be fixed (including entry within config.properties)
boolean assumeOnlySB = getFlag("assume_only_signauture_blocks");
boolean checkOld = getFlag("check_old_textual_sigs");
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java index 04971c6..13e6703 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java @@ -189,16 +189,23 @@ public class SignServlet extends HttpServlet String sig_pos_y = (String) request.getParameter(FormFields.FIELD_SIGPOS_Y);
String sig_pos_p = (String) request.getParameter(FormFields.FIELD_SIGPOS_P);
- try
- {
- pos = new TablePos("y:" + sig_pos_y + ";p:" + sig_pos_p);
- }
- catch (PDFDocumentException e)
- {
- log.warn("Uanable to create signature position object: " + e.getMessage());
+ // added by tknall
+ if (sig_pos_y != null && sig_pos_p != null) {
+ try
+ {
+ pos = new TablePos("y:" + sig_pos_y + ";p:" + sig_pos_p);
+ }
+ catch (PDFDocumentException e)
+ {
+ log.warn("Unable to create signature position object: " + e.getMessage());
+ }
+ } else {
+ log.debug("No signature position provided.");
}
- String query = pdf_url + "&" + FormFields.FIELD_PDF_ID + "=" + pdf_id;
+ // fixed by tknall: if we already have parameters "&" must be used instead of "?"
+ String paramSeparator = (pdf_url.indexOf("?") != -1) ? "&" : "?";
+ String query = pdf_url + paramSeparator + FormFields.FIELD_PDF_ID + "=" + pdf_id;
// wprinz: rem: this allocation is useless
// byte[] extern_pdf = new byte[Integer.parseInt(pdf_length)];
|