diff options
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index 52eb8468..b2559b25 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -793,6 +793,23 @@ public class PdfAsHelper { return baos.toByteArray(); } + public static boolean checkDataUrlAccess(HttpServletRequest request) throws Exception { + HttpSession session = request.getSession(false); + + if(session != null) { + Object statusObject = session + .getAttribute(PDF_STATUS); + if(statusObject != null && statusObject instanceof StatusRequest) { + StatusRequest statusRequest = (StatusRequest)statusObject; + if(statusRequest.needCertificate() || statusRequest.needSignature()) { + return true; + } + } + } + + return false; + } + public static void injectCertificate(HttpServletRequest request, HttpServletResponse response, InfoboxReadResponseType infoboxReadResponseType, |