diff --git a/.gitignore b/.gitignore index c5a8f2e7..b0bbfb9d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ bin/ tmp/ *.tmp *.bak +*.exe *.swp *~.nib local.properties diff --git a/README.md b/README.md index 3a5c572f..ec83c501 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,13 @@ Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "pod Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md +## Reuse stored files + +Certain functionality like ``Sign`` Supports pre-saved files stored at ``/customFiles/signatures/``, image files placed within here will be accesable to be used via webUI +Currently this supports two folder types +- ``/customFiles/signatures/ALL_USERS`` accessible to all users, useful for orginasations were many users use same files or for users not using authentication +- ``/customFiles/signatures/{username}`` such as ``/customFiles/signatures/froodle`` accessible to only the ``froodle`` username, private for all others + ## Supported Languages Stirling PDF currently supports 38! diff --git a/build.gradle b/build.gradle index e9ceaa90..f5dadc36 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ ext { } group = "stirling.software" -version = "0.30.1" +version = "0.31.0" java { // 17 is lowest but we support and recommend 21 diff --git a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java index 618c39d6..8156e8d6 100644 --- a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java +++ b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java @@ -104,7 +104,32 @@ public class SecurityConfiguration { requestHandler.setCsrfRequestAttributeName(null); http.csrf( csrf -> - csrf.csrfTokenRepository(cookieRepo) + csrf.ignoringRequestMatchers( + request -> { + String apiKey = request.getHeader("X-API-Key"); + + // If there's no API key, don't ignore CSRF + // (return false) + if (apiKey == null || apiKey.trim().isEmpty()) { + return false; + } + + // Validate API key using existing UserService + try { + Optional user = + userService.getUserByApiKey(apiKey); + // If API key is valid, ignore CSRF (return + // true) + // If API key is invalid, don't ignore CSRF + // (return false) + return user.isPresent(); + } catch (Exception e) { + // If there's any error validating the API + // key, don't ignore CSRF + return false; + } + }) + .csrfTokenRepository(cookieRepo) .csrfTokenRequestHandler(requestHandler)); } http.addFilterBefore(rateLimitingFilter(), UsernamePasswordAuthenticationFilter.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java index b36f8c90..f8e5f25e 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java @@ -96,17 +96,18 @@ public class CertSignController { public CreateSignature(KeyStore keystore, char[] pin) throws KeyStoreException, - UnrecoverableKeyException, - NoSuchAlgorithmException, - IOException, - CertificateException { + UnrecoverableKeyException, + NoSuchAlgorithmException, + IOException, + CertificateException { super(keystore, pin); ClassPathResource resource = new ClassPathResource("static/images/signature.png"); imageFile = resource.getFile(); } - public InputStream createVisibleSignature(PDDocument srcDoc, PDSignature signature, Integer pageNumber, - Boolean showImage) throws IOException { + public InputStream createVisibleSignature( + PDDocument srcDoc, PDSignature signature, Integer pageNumber, Boolean showImage) + throws IOException { // modified from org.apache.pdfbox.examples.signature.CreateVisibleSignature2 try (PDDocument doc = new PDDocument()) { PDPage page = new PDPage(srcDoc.getPage(pageNumber).getMediaBox()); @@ -151,8 +152,8 @@ public class CertSignController { extState.setNonStrokingAlphaConstant(0.5f); cs.setGraphicsStateParameters(extState); cs.transform(Matrix.getScaleInstance(0.08f, 0.08f)); - PDImageXObject img = PDImageXObject.createFromFileByExtension(imageFile, - doc); + PDImageXObject img = + PDImageXObject.createFromFileByExtension(imageFile, doc); cs.drawImage(img, 100, 0); cs.restoreGraphicsState(); } @@ -200,7 +201,10 @@ public class CertSignController { } @PostMapping(consumes = "multipart/form-data", value = "/cert-sign") - @Operation(summary = "Sign PDF with a Digital Certificate", description = "This endpoint accepts a PDF file, a digital certificate and related information to sign the PDF. It then returns the digitally signed PDF file. Input:PDF Output:PDF Type:SISO") + @Operation( + summary = "Sign PDF with a Digital Certificate", + description = + "This endpoint accepts a PDF file, a digital certificate and related information to sign the PDF. It then returns the digitally signed PDF file. Input:PDF Output:PDF Type:SISO") public ResponseEntity signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request) throws Exception { MultipartFile pdf = request.getFileInput(); @@ -229,7 +233,7 @@ public class CertSignController { PrivateKey privateKey = getPrivateKeyFromPEM(privateKeyFile.getBytes(), password); Certificate cert = (Certificate) getCertificateFromPEM(certFile.getBytes()); ks.setKeyEntry( - "alias", privateKey, password.toCharArray(), new Certificate[] { cert }); + "alias", privateKey, password.toCharArray(), new Certificate[] {cert}); break; case "PKCS12": ks = KeyStore.getInstance("PKCS12"); @@ -245,7 +249,15 @@ public class CertSignController { CreateSignature createSignature = new CreateSignature(ks, password.toCharArray()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); - sign(pdfDocumentFactory, pdf.getBytes(), baos, createSignature, showSignature, pageNumber, name, location, + sign( + pdfDocumentFactory, + pdf.getBytes(), + baos, + createSignature, + showSignature, + pageNumber, + name, + location, reason); return WebResponseUtils.boasToWebResponse( baos, @@ -274,8 +286,8 @@ public class CertSignController { if (showSignature) { SignatureOptions signatureOptions = new SignatureOptions(); - signatureOptions - .setVisualSignature(instance.createVisibleSignature(doc, signature, pageNumber, true)); + signatureOptions.setVisualSignature( + instance.createVisibleSignature(doc, signature, pageNumber, true)); signatureOptions.setPage(pageNumber); doc.addSignature(signature, instance, signatureOptions); @@ -291,19 +303,22 @@ public class CertSignController { private PrivateKey getPrivateKeyFromPEM(byte[] pemBytes, String password) throws IOException, OperatorCreationException, PKCSException { - try (PEMParser pemParser = new PEMParser(new InputStreamReader(new ByteArrayInputStream(pemBytes)))) { + try (PEMParser pemParser = + new PEMParser(new InputStreamReader(new ByteArrayInputStream(pemBytes)))) { Object pemObject = pemParser.readObject(); JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); PrivateKeyInfo pkInfo; if (pemObject instanceof PKCS8EncryptedPrivateKeyInfo) { - InputDecryptorProvider decProv = new JceOpenSSLPKCS8DecryptorProviderBuilder() - .build(password.toCharArray()); + InputDecryptorProvider decProv = + new JceOpenSSLPKCS8DecryptorProviderBuilder().build(password.toCharArray()); pkInfo = ((PKCS8EncryptedPrivateKeyInfo) pemObject).decryptPrivateKeyInfo(decProv); } else if (pemObject instanceof PEMEncryptedKeyPair) { - PEMDecryptorProvider decProv = new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); - pkInfo = ((PEMEncryptedKeyPair) pemObject) - .decryptKeyPair(decProv) - .getPrivateKeyInfo(); + PEMDecryptorProvider decProv = + new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); + pkInfo = + ((PEMEncryptedKeyPair) pemObject) + .decryptKeyPair(decProv) + .getPrivateKeyInfo(); } else { pkInfo = ((PEMKeyPair) pemObject).getPrivateKeyInfo(); } diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index 14af6ee7..99e29bde 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -31,6 +31,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.controller.api.pipeline.UserServiceInterface; +import stirling.software.SPDF.model.SignatureFile; +import stirling.software.SPDF.service.SignatureService; + @Controller @Tag(name = "General", description = "General APIs") public class GeneralWebController { @@ -171,11 +175,28 @@ public class GeneralWebController { return "split-pdfs"; } + private static final String SIGNATURE_BASE_PATH = "customFiles/static/signatures/"; + private static final String ALL_USERS_FOLDER = "ALL_USERS"; + + @Autowired private SignatureService signatureService; + + @Autowired(required = false) + private UserServiceInterface userService; + @GetMapping("/sign") @Hidden public String signForm(Model model) { + String username = ""; + if (userService != null) { + username = userService.getCurrentUsername(); + } + + // Get signatures from both personal and ALL_USERS folders + List signatures = signatureService.getAvailableSignatures(username); + model.addAttribute("currentPage", "sign"); model.addAttribute("fonts", getFontNames()); + model.addAttribute("signatures", signatures); return "sign"; } diff --git a/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java b/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java new file mode 100644 index 00000000..eba4e1c4 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java @@ -0,0 +1,44 @@ +package stirling.software.SPDF.controller.web; + +import java.io.IOException; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import stirling.software.SPDF.controller.api.pipeline.UserServiceInterface; +import stirling.software.SPDF.service.SignatureService; + +@Controller +@RequestMapping("/api/v1/general/") +public class SignatureController { + + @Autowired private SignatureService signatureService; + + @Autowired(required = false) + private UserServiceInterface userService; + + @GetMapping("/sign/{fileName}") + public ResponseEntity getSignature(@PathVariable(name = "fileName") String fileName) + throws IOException { + String username = "NON_SECURITY_USER"; + if (userService != null) { + username = userService.getCurrentUsername(); + } + + // Verify access permission + if (!signatureService.hasAccessToFile(username, fileName)) { + return ResponseEntity.status(HttpStatus.FORBIDDEN).build(); + } + + byte[] imageBytes = signatureService.getSignatureBytes(username, fileName); + return ResponseEntity.ok() + .contentType(MediaType.IMAGE_JPEG) // Adjust based on file type + .body(imageBytes); + } +} diff --git a/src/main/java/stirling/software/SPDF/model/SignatureFile.java b/src/main/java/stirling/software/SPDF/model/SignatureFile.java new file mode 100644 index 00000000..7d82ebf0 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/SignatureFile.java @@ -0,0 +1,11 @@ +package stirling.software.SPDF.model; + +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class SignatureFile { + private String fileName; + private String category; // "Personal" or "Shared" +} diff --git a/src/main/java/stirling/software/SPDF/service/SignatureService.java b/src/main/java/stirling/software/SPDF/service/SignatureService.java new file mode 100644 index 00000000..c939337f --- /dev/null +++ b/src/main/java/stirling/software/SPDF/service/SignatureService.java @@ -0,0 +1,100 @@ +package stirling.software.SPDF.service; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.springframework.stereotype.Service; +import org.thymeleaf.util.StringUtils; + +import lombok.extern.slf4j.Slf4j; +import stirling.software.SPDF.model.SignatureFile; + +@Service +@Slf4j +public class SignatureService { + + private static final String SIGNATURE_BASE_PATH = "customFiles/signatures/"; + private static final String ALL_USERS_FOLDER = "ALL_USERS"; + + public boolean hasAccessToFile(String username, String fileName) throws IOException { + validateFileName(fileName); + // Check if file exists in user's personal folder or ALL_USERS folder + Path userPath = Paths.get(SIGNATURE_BASE_PATH, username, fileName); + Path allUsersPath = Paths.get(SIGNATURE_BASE_PATH, ALL_USERS_FOLDER, fileName); + + return Files.exists(userPath) || Files.exists(allUsersPath); + } + + public List getAvailableSignatures(String username) { + List signatures = new ArrayList<>(); + + // Get signatures from user's personal folder + if (!StringUtils.isEmptyOrWhitespace(username)) { + Path userFolder = Paths.get(SIGNATURE_BASE_PATH, username); + if (Files.exists(userFolder)) { + try { + signatures.addAll(getSignaturesFromFolder(userFolder, "Personal")); + } catch (IOException e) { + log.error("Error reading user signatures folder", e); + } + } + } + + // Get signatures from ALL_USERS folder + Path allUsersFolder = Paths.get(SIGNATURE_BASE_PATH, ALL_USERS_FOLDER); + if (Files.exists(allUsersFolder)) { + try { + signatures.addAll(getSignaturesFromFolder(allUsersFolder, "Shared")); + } catch (IOException e) { + log.error("Error reading shared signatures folder", e); + } + } + + return signatures; + } + + private List getSignaturesFromFolder(Path folder, String category) + throws IOException { + return Files.list(folder) + .filter(path -> isImageFile(path)) + .map(path -> new SignatureFile(path.getFileName().toString(), category)) + .collect(Collectors.toList()); + } + + public byte[] getSignatureBytes(String username, String fileName) throws IOException { + validateFileName(fileName); + // First try user's personal folder + Path userPath = Paths.get(SIGNATURE_BASE_PATH, username, fileName); + if (Files.exists(userPath)) { + return Files.readAllBytes(userPath); + } + + // Then try ALL_USERS folder + Path allUsersPath = Paths.get(SIGNATURE_BASE_PATH, ALL_USERS_FOLDER, fileName); + if (Files.exists(allUsersPath)) { + return Files.readAllBytes(allUsersPath); + } + + throw new FileNotFoundException("Signature file not found"); + } + + private boolean isImageFile(Path path) { + String fileName = path.getFileName().toString().toLowerCase(); + return fileName.endsWith(".jpg") + || fileName.endsWith(".jpeg") + || fileName.endsWith(".png") + || fileName.endsWith(".gif"); + } + + private void validateFileName(String fileName) { + if (fileName.contains("..") || fileName.contains("/") || fileName.contains("\\")) { + throw new IllegalArgumentException("Invalid filename"); + } + } +} diff --git a/src/main/java/stirling/software/SPDF/utils/ImageProcessingUtils.java b/src/main/java/stirling/software/SPDF/utils/ImageProcessingUtils.java index ba305fcc..4eba6c25 100644 --- a/src/main/java/stirling/software/SPDF/utils/ImageProcessingUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/ImageProcessingUtils.java @@ -30,17 +30,19 @@ public class ImageProcessingUtils { BufferedImage convertedImage; switch (colorType) { case "greyscale": - convertedImage = new BufferedImage( - sourceImage.getWidth(), - sourceImage.getHeight(), - BufferedImage.TYPE_BYTE_GRAY); + convertedImage = + new BufferedImage( + sourceImage.getWidth(), + sourceImage.getHeight(), + BufferedImage.TYPE_BYTE_GRAY); convertedImage.getGraphics().drawImage(sourceImage, 0, 0, null); break; case "blackwhite": - convertedImage = new BufferedImage( - sourceImage.getWidth(), - sourceImage.getHeight(), - BufferedImage.TYPE_BYTE_BINARY); + convertedImage = + new BufferedImage( + sourceImage.getWidth(), + sourceImage.getHeight(), + BufferedImage.TYPE_BYTE_BINARY); convertedImage.getGraphics().drawImage(sourceImage, 0, 0, null); break; default: // full color @@ -79,7 +81,8 @@ public class ImageProcessingUtils { public static double extractImageOrientation(InputStream is) throws IOException { try { Metadata metadata = ImageMetadataReader.readMetadata(is); - ExifSubIFDDirectory directory = metadata.getFirstDirectoryOfType(ExifSubIFDDirectory.class); + ExifSubIFDDirectory directory = + metadata.getFirstDirectoryOfType(ExifSubIFDDirectory.class); if (directory == null) { return 0; } @@ -106,10 +109,11 @@ public class ImageProcessingUtils { if (orientation == 0) { return image; } - AffineTransform transform = AffineTransform.getRotateInstance( - Math.toRadians(orientation), - image.getWidth() / 2.0, - image.getHeight() / 2.0); + AffineTransform transform = + AffineTransform.getRotateInstance( + Math.toRadians(orientation), + image.getWidth() / 2.0, + image.getHeight() / 2.0); AffineTransformOp op = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR); return op.filter(image, null); } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index d77feac6..0a0b4254 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=رسم التوقيع sign.text=إدخال النص sign.clear=مسح sign.add=إضافة +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 094b322a..283b8490 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -80,6 +80,7 @@ pro=Pro page=Страница pages=Страници loading=Loading... +addToDoc=Add to Document legal.privacy=Политика за поверителност legal.terms=Правила и условия @@ -808,6 +809,11 @@ sign.draw=Начертайте подпис sign.text=Въвеждане на текст sign.clear=Изчисти sign.add=Добави +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index cb6be070..88a70793 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Dibuixa la signatura sign.text=Entrada de text sign.clear=Esborrar sign.add=Afegeix +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_cs_CZ.properties b/src/main/resources/messages_cs_CZ.properties index d67562f8..6beb4aea 100644 --- a/src/main/resources/messages_cs_CZ.properties +++ b/src/main/resources/messages_cs_CZ.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Nakreslit podpis sign.text=Vstup textu sign.clear=Vymazat sign.add=Přidat +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_da_DK.properties b/src/main/resources/messages_da_DK.properties index 5521cbd3..2a670854 100644 --- a/src/main/resources/messages_da_DK.properties +++ b/src/main/resources/messages_da_DK.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Tegn Underskrift sign.text=Tekstinput sign.clear=Ryd sign.add=Tilføj +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 2737b736..6eb719ba 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Datenschutz legal.terms=AGB @@ -808,6 +809,11 @@ sign.draw=Signatur zeichnen sign.text=Texteingabe sign.clear=Leeren sign.add=Signieren +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index fa911257..02574333 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Σχεδίαση υπογραφής sign.text=Εισαγωγή κειμένου sign.clear=Καθάρισμα sign.add=Προσθήκη +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 0d233436..019930d8 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Draw Signature sign.text=Text Input sign.clear=Clear sign.add=Add +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 9c67fab7..bfb5d8e7 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Draw Signature sign.text=Text Input sign.clear=Clear sign.add=Add +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index c34d6234..e5a2556b 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -80,6 +80,7 @@ pro=Pro page=Página pages=Páginas loading=Loading... +addToDoc=Add to Document legal.privacy=Política de Privacidad legal.terms=Términos y Condiciones @@ -808,6 +809,11 @@ sign.draw=Dibujar firma sign.text=Entrada de texto sign.clear=Borrar sign.add=Agregar +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index f50f254b..84116338 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Marraztu sinadura sign.text=Testua sartzea sign.clear=Garbitu sign.add=Gehitu +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 0bf6d87c..2918d5f1 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Politique de Confidentialité legal.terms=Conditions Générales @@ -808,6 +809,11 @@ sign.draw=Dessiner une signature sign.text=Saisir de texte sign.clear=Effacer sign.add=Ajouter +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ga_IE.properties b/src/main/resources/messages_ga_IE.properties index a254ca74..ca6839d6 100644 --- a/src/main/resources/messages_ga_IE.properties +++ b/src/main/resources/messages_ga_IE.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Tarraing Síniú sign.text=Ionchur Téacs sign.clear=Glan sign.add=Cuir +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index f5029b1d..68a2ee69 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -80,6 +80,7 @@ pro=Pro page=पृष्ठ pages=पृष्ठों loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=हस्ताक्षर बनाएँ sign.text=पाठ इनपुट sign.clear=साफ़ करें sign.add=जोड़ें +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_hr_HR.properties b/src/main/resources/messages_hr_HR.properties index 2317ca16..e39f5282 100644 --- a/src/main/resources/messages_hr_HR.properties +++ b/src/main/resources/messages_hr_HR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Nacrtaj potpis sign.text=Tekstualni unos sign.clear=Obriši sign.add=Dodaj +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index c776b58c..4dcc0297 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Aláírás rajzolása sign.text=Szöveg beírása sign.clear=Törlés sign.add=Hozzáadás +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 5a4b716f..1b79be4d 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -80,6 +80,7 @@ pro=Pro page=Halaman pages=Halaman-halaman loading=Loading... +addToDoc=Add to Document legal.privacy=Kebijakan Privasi legal.terms=Syarat dan Ketentuan @@ -808,6 +809,11 @@ sign.draw=Gambar Tanda Tangan sign.text=Masukan Teks sign.clear=Hapus sign.add=Tambah +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 67322c42..3330cffc 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -80,6 +80,7 @@ pro=Pro page=Pagina pages=Pagine loading=Loading... +addToDoc=Add to Document legal.privacy=Informativa sulla privacy legal.terms=Termini e Condizioni @@ -808,6 +809,11 @@ sign.draw=Disegna Firma sign.text=Testo sign.clear=Cancella sign.add=Aggiungi +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 09ff1b21..f66ad798 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=プライバシーポリシー legal.terms=利用規約 @@ -808,6 +809,11 @@ sign.draw=署名を書く sign.text=テキスト入力 sign.clear=クリア sign.add=追加 +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 054c1163..c13a08f2 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=서명 그리기 sign.text=텍스트 입력 sign.clear=초기화 sign.add=추가 +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index 054e2d18..cbd79df3 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Handtekening tekenen sign.text=Tekstinvoer sign.clear=Wissen sign.add=Toevoegen +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_no_NB.properties b/src/main/resources/messages_no_NB.properties index 99e7c9b8..8515427e 100644 --- a/src/main/resources/messages_no_NB.properties +++ b/src/main/resources/messages_no_NB.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Tegn signatur sign.text=Tekstinput sign.clear=Slett sign.add=Legg til +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 311cccc6..35cc8758 100755 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -80,6 +80,7 @@ pro=Pro page=Strona pages=Strony loading=Loading... +addToDoc=Add to Document legal.privacy=Polityka Prywatności legal.terms=Zasady i Postanowienia @@ -808,6 +809,11 @@ sign.draw=Narysuj podpis sign.text=Wprowadź tekst sign.clear=Wyczyść sign.add=Dodaj +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index f982c8d5..e495bb2b 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -80,6 +80,7 @@ pro=Pro page=Página pages=Páginas loading=Loading... +addToDoc=Add to Document legal.privacy=Política de Privacidade legal.terms=Termos e Condições @@ -808,6 +809,11 @@ sign.draw=Desenhar Assinatura sign.text=Inserir texto sign.clear=Limpar sign.add=Adicionar +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index d7e76e0b..847b833c 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Desenhar Assinatura sign.text=Inserir Texto sign.clear=Limpar sign.add=Adicionar +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 1a4cb185..8936dbb6 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Desenează Semnătura sign.text=Introdu Textul sign.clear=Curăță sign.add=Adaugă +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 19583530..62e8d3d0 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Нарисовать подпись sign.text=Ввод текста sign.clear=Очистить sign.add=Добавить +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_sk_SK.properties b/src/main/resources/messages_sk_SK.properties index 86467ce1..05696f3e 100644 --- a/src/main/resources/messages_sk_SK.properties +++ b/src/main/resources/messages_sk_SK.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Kresliť podpis sign.text=Textový vstup sign.clear=Vymazať sign.add=Pridať +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index d302f2c6..75338172 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Nacrtaj potpis sign.text=Tekstualni unos sign.clear=Obriši sign.add=Dodaj +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 692ba377..2e894543 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Rita signatur sign.text=Textinmatning sign.clear=Rensa sign.add=Lägg till +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_th_TH.properties b/src/main/resources/messages_th_TH.properties index 272db885..dda8151d 100644 --- a/src/main/resources/messages_th_TH.properties +++ b/src/main/resources/messages_th_TH.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=วาดลายเซ็น sign.text=ป้อนข้อความ sign.clear=ล้าง sign.add=เพิ่ม +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 906082ce..42f47f8a 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Gizlilik Politikası legal.terms=Şartlar ve koşullar @@ -808,6 +809,11 @@ sign.draw=İmza Çiz sign.text=Metin Girişi sign.clear=Temizle sign.add=Ekle +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index 0c0ed2c2..78b71aab 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Намалювати підпис sign.text=Ввід тексту sign.clear=Очистити sign.add=Додати +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_vi_VN.properties b/src/main/resources/messages_vi_VN.properties index 59d9848c..0d11b6e1 100644 --- a/src/main/resources/messages_vi_VN.properties +++ b/src/main/resources/messages_vi_VN.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=Vẽ chữ ký sign.text=Nhập văn bản sign.clear=Xóa sign.add=Thêm +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 69992626..614ac1f7 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -80,6 +80,7 @@ pro=Pro page=Page pages=Pages loading=Loading... +addToDoc=Add to Document legal.privacy=Privacy Policy legal.terms=Terms and Conditions @@ -808,6 +809,11 @@ sign.draw=绘制签名 sign.text=文本输入 sign.clear=清除 sign.add=添加 +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index 3c5ad03a..24ab70d9 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -80,6 +80,7 @@ pro=專業版 page=頁面 pages=頁面 loading=Loading... +addToDoc=Add to Document legal.privacy=隱私權政策 legal.terms=使用條款 @@ -808,6 +809,11 @@ sign.draw=繪製簽章 sign.text=文字輸入 sign.clear=清除 sign.add=新增 +sign.saved=Saved Signatures +sign.save=Save Signature +sign.personalSigs=Personal Signatures +sign.sharedSigs=Shared Signatures +sign.noSavedSigs=No saved signatures found #repair diff --git a/src/main/resources/static/css/sign.css b/src/main/resources/static/css/sign.css index 26bb1677..3055b52e 100644 --- a/src/main/resources/static/css/sign.css +++ b/src/main/resources/static/css/sign.css @@ -62,3 +62,53 @@ select#font-select option { background-color: rgba(52, 152, 219, 0.2); /* Darken background on hover */ } +.signature-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 1rem; + padding: 1rem; + max-height: 400px; + overflow-y: auto; +} + +.signature-list { + max-height: 400px; + overflow-y: auto; +} + +.signature-list-item { + padding: 0.75rem; + border: 1px solid #dee2e6; + border-radius: 4px; + margin-bottom: 0.5rem; + cursor: pointer; + transition: background-color 0.2s; +} + +.signature-list-item:hover { + background-color: #f8f9fa; +} + +.signature-list-info { + display: flex; + justify-content: space-between; + align-items: center; +} + +.signature-list-name { + font-weight: 500; +} + +.signature-list-details { + color: #6c757d; + font-size: 0.875rem; +} + +.signature-list-details small:not(:last-child) { + margin-right: 1rem; +} + +.view-toggle { + text-align: right; + padding: 0.5rem 1rem; +} \ No newline at end of file diff --git a/src/main/resources/static/js/fetch-utils.js b/src/main/resources/static/js/fetch-utils.js new file mode 100644 index 00000000..f92c7d9e --- /dev/null +++ b/src/main/resources/static/js/fetch-utils.js @@ -0,0 +1,29 @@ +window.fetchWithCsrf = async function(url, options = {}) { + function getCsrfToken() { + const cookieValue = document.cookie + .split('; ') + .find(row => row.startsWith('XSRF-TOKEN=')) + ?.split('=')[1]; + + if (cookieValue) { + return cookieValue; + } + + const csrfElement = document.querySelector('input[name="_csrf"]'); + return csrfElement ? csrfElement.value : null; + } + + // Create a new options object to avoid modifying the passed object + const fetchOptions = { ...options }; + + // Ensure headers object exists + fetchOptions.headers = { ...options.headers }; + + // Add CSRF token if available + const csrfToken = getCsrfToken(); + if (csrfToken) { + fetchOptions.headers['X-XSRF-TOKEN'] = csrfToken; + } + + return fetch(url, fetchOptions); +} \ No newline at end of file diff --git a/src/main/resources/static/js/pipeline.js b/src/main/resources/static/js/pipeline.js index 837b6665..a1542b41 100644 --- a/src/main/resources/static/js/pipeline.js +++ b/src/main/resources/static/js/pipeline.js @@ -119,7 +119,7 @@ document.getElementById("submitConfigBtn").addEventListener("click", function () formData.append("json", pipelineConfigJson); console.log("formData", formData); - fetch("api/v1/pipeline/handleData", { + fetchWithCsrf("api/v1/pipeline/handleData", { method: "POST", body: formData, }) @@ -154,7 +154,7 @@ let apiDocs = {}; let apiSchemas = {}; let operationSettings = {}; -fetch("v1/api-docs") +fetchWithCsrf("v1/api-docs") .then((response) => response.json()) .then((data) => { apiDocs = data.paths; diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index ce80a13c..43aebc99 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -384,7 +384,7 @@ - +
-
+
\
diff --git a/src/main/resources/templates/security/get-info-on-pdf.html b/src/main/resources/templates/security/get-info-on-pdf.html index 82a16a14..45c2d9d4 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -31,12 +31,16 @@ + + + + + + +
+
+ +
+ +
+ + + + + +
+ +
+
+
+
+ +
+ +
+
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + +
+
+

No saved signatures found

+
+
+ + + + + + + + + + +