Browse Source

fix build issues

Jason Rivard 5 years ago
parent
commit
5aea227e3b

+ 2 - 1
server/src/main/java/password/pwm/svc/report/ReportService.java

@@ -349,7 +349,8 @@ public class ReportService implements PwmService
                     {
                         if ( executorService != null )
                         {
-                            LOGGER.error( SessionLabel.REPORTING_SESSION_LABEL, () -> "directory unavailable error during background SearchLDAP, will retry; error: " + e.getMessage() );
+                            LOGGER.error( SessionLabel.REPORTING_SESSION_LABEL,
+                                    () -> "directory unavailable error during background SearchLDAP, will retry; error: " + e.getMessage() );
                             pwmApplication.getPwmScheduler().scheduleJob( new ReadLDAPTask(), executorService, TimeDuration.of( 10, TimeDuration.Unit.MINUTES ) );
                             errorProcessed = true;
                         }

+ 2 - 1
server/src/main/java/password/pwm/util/Validator.java

@@ -142,7 +142,8 @@ public class Validator
                 final String newString = theString.replaceAll( testString, "" );
                 if ( !newString.equals( theString ) )
                 {
-                    LOGGER.warn( () -> "removing potentially malicious string values from input, converting '" + input + "' newValue=" + newString + "' pattern='" + testString + "'" );
+                    LOGGER.warn( () -> "removing potentially malicious string values from input, converting '"
+                            + input + "' newValue=" + newString + "' pattern='" + testString + "'" );
                     theString = newString;
                 }
             }

+ 2 - 1
server/src/main/java/password/pwm/util/password/PasswordRuleReaderHelper.java

@@ -175,7 +175,8 @@ public class PasswordRuleReaderHelper
                 catch ( final PatternSyntaxException e )
                 {
                     final String valueToCompileFinal = valueToCompile;
-                    LOGGER.warn( () -> "reading password rule value '" + valueToCompileFinal + "' for rule " + rule.getKey() + " is not a valid regular expression " + e.getMessage() );
+                    LOGGER.warn( () -> "reading password rule value '" + valueToCompileFinal + "' for rule " + rule.getKey()
+                            + " is not a valid regular expression " + e.getMessage() );
                 }
             }
         }

+ 4 - 1
server/src/main/java/password/pwm/util/secure/X509Utils.java

@@ -98,7 +98,10 @@ public class X509Utils
             throws PwmOperationalException
     {
         LOGGER.debug( () -> "ServerCertReader: beginning certificate read procedure to import certificates from host=" + host + ", port=" + port );
-        final CertificateReadingTrustManager certReaderTm = CertificateReadingTrustManager.newCertReaderTrustManager( configuration, readCertificateFlagsFromConfig( configuration ) );
+        final CertificateReadingTrustManager certReaderTm = CertificateReadingTrustManager.newCertReaderTrustManager(
+                configuration,
+                readCertificateFlagsFromConfig( configuration ) );
+
         try
         {
             // use custom trust manager to read the certificates

+ 22 - 3
server/src/test/java/password/pwm/util/secure/PromiscuousTrustManagerTest.java

@@ -1,3 +1,23 @@
+/*
+ * Password Management Servlets (PWM)
+ * http://www.pwm-project.org
+ *
+ * Copyright (c) 2006-2009 Novell, Inc.
+ * Copyright (c) 2009-2019 The PWM Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package password.pwm.util.secure;
 
 import org.junit.Test;
@@ -21,9 +41,8 @@ public class PromiscuousTrustManagerTest
         final X509TrustManager trustManager = PromiscuousTrustManager.createPromiscuousTrustManager();
         final X509Certificate[] certificates = new X509Certificate[]
                 {
-                        cert1
+                        cert1,
                 };
         trustManager.checkServerTrusted( certificates, "test" );
     }
-
-}
+}

+ 22 - 4
server/src/test/resources/password/pwm/util/secure/PromiscuousTrustManagerTest.properties

@@ -1,5 +1,24 @@
-cert1=-----BEGIN CERTIFICATE-----\
-MIIDBzCCAe+gAwIBAgIJAI0GS0VAJiXHMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV\
+#
+# Password Management Servlets (PWM)
+# http://www.pwm-project.org
+#
+# Copyright (c) 2006-2009 Novell, Inc.
+# Copyright (c) 2009-2019 The PWM Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+cert1=MIIDBzCCAe+gAwIBAgIJAI0GS0VAJiXHMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV\
 BAMMD3d3dy5leGFtcGxlLmNvbTAeFw0yMDAyMjMwMTEzNTNaFw0zMDAyMjAwMTEz\
 NTNaMBoxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEB\
 BQADggEPADCCAQoCggEBAM2Byf419Vwos7RwxR2VAnaqx0bdH6EWWukXGqF/dF6A\
@@ -15,5 +34,4 @@ jnJIeD9C68+gE5gR5UgcxcDCI5xHeAGmJKNUFbeFxS951Ah43yI4six0HLKO0J3n\
 PHkhB8433gxeHx7BvRyaAVR+b3OmRDcZ7oJHTGsH4LeuVeDBhU0WLcanZsQ0U3VI\
 O7JS7Zj9tp5hSpp4RVuO7dNX30N+KoDfvOV5Bqg5PV5315jdblnJEM1RFfacua7d\
 KUjGqNaR95xDaTV6ucGHFhnq0phQnEbGhxpllvqZv59XqJOFEItdwlwQWX4JEwfz\
-XIcfkWcJ8BjzRRA=\
------END CERTIFICATE-----
+XIcfkWcJ8BjzRRA=