From a531f53893c59291aef394a2ccb4d452574561cb Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Wed, 18 Dec 2024 13:40:24 +0100 Subject: [PATCH] Exclude Sensitive and Error-Prone Fields from toString() in SAML2 Configuration --- .../software/SPDF/model/ApplicationProperties.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java index 703b5ee6..fd7c278b 100644 --- a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java +++ b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java @@ -122,18 +122,19 @@ public class ApplicationProperties { @Getter @Setter + @ToString public static class SAML2 { private Boolean enabled = false; private Boolean autoCreateUser = false; private Boolean blockRegistration = false; private String registrationId = "stirling"; - private String idpMetadataUri; + @ToString.Exclude private String idpMetadataUri; private String idpSingleLogoutUrl; private String idpSingleLoginUrl; private String idpIssuer; private String idpCert; - private String privateKey; - private String spCert; + @ToString.Exclude private String privateKey; + @ToString.Exclude private String spCert; public InputStream getIdpMetadataUri() throws IOException { if (idpMetadataUri.startsWith("classpath:")) {