[java-identity-provider] branch main updated: IDP-1801 - NPEs on invalid enum values in LDAP factory bean
Scott Cantor
cantor.2 at osu.edu
Wed Apr 21 21:12:36 UTC 2021
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=0d05ca0da47527fc0d6d778a8842e2f288f78bea
The following commit(s) were added to refs/heads/main by this push:
new 0d05ca0da IDP-1801 - NPEs on invalid enum values in LDAP factory bean
0d05ca0da is described below
commit 0d05ca0da47527fc0d6d778a8842e2f288f78bea
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Apr 21 17:12:29 2021 -0400
IDP-1801 - NPEs on invalid enum values in LDAP factory bean
https://issues.shibboleth.net/jira/browse/IDP-1801
Additional guard, plus trims added.
---
.../idp/authn/config/LDAPAuthenticationFactoryBean.java | 3 +++
.../net/shibboleth/idp/flows/authn/password-authn-beans.xml | 8 ++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/LDAPAuthenticationFactoryBean.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/LDAPAuthenticationFactoryBean.java
index eae5847ec..a1078a096 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/LDAPAuthenticationFactoryBean.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/config/LDAPAuthenticationFactoryBean.java
@@ -384,6 +384,9 @@ public class LDAPAuthenticationFactoryBean extends AbstractFactoryBean<Authentic
public void setBindPoolPassivatorType(@Nonnull @NotEmpty final String type) {
bindPoolPassivatorType = PassivatorType.fromLabel(type);
+ if (bindPoolPassivatorType == null) {
+ throw new IllegalArgumentException("bindPoolPassivatorType property did not have a valid value");
+ }
}
public void setPrunePeriod(@Nullable final Duration period) {
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/password-authn-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/password-authn-beans.xml
index 4716a9406..c56364c61 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/password-authn-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/authn/password-authn-beans.xml
@@ -143,9 +143,9 @@
<bean id="shibboleth.LDAPAuthenticationFactory" abstract="true"
class="net.shibboleth.idp.authn.config.LDAPAuthenticationFactoryBean"
- p:authenticatorType="%{idp.authn.LDAP.authenticator:anonSearchAuthenticator}"
- p:trustType="%{idp.authn.LDAP.sslConfig:certificateTrust}"
- p:connectionStrategyType="%{idp.authn.LDAP.connectionStrategy:ACTIVE_PASSIVE}"
+ p:authenticatorType="#{'%{idp.authn.LDAP.authenticator:anonSearchAuthenticator}'.trim()}"
+ p:trustType="#{'%{idp.authn.LDAP.sslConfig:certificateTrust}'.trim()}"
+ p:connectionStrategyType="#{'%{idp.authn.LDAP.connectionStrategy:ACTIVE_PASSIVE}'.trim()}"
p:ldapUrl="%{idp.authn.LDAP.ldapURL:ldap://localhost:10389}"
p:useStartTLS="%{idp.authn.LDAP.useStartTLS:true}"
p:connectTimeout="%{idp.authn.LDAP.connectTimeout:PT3S}"
@@ -161,7 +161,7 @@
p:validatePeriod="%{idp.pool.LDAP.validatePeriod:PT5M}"
p:validateDn="#{'%{idp.authn.LDAP.validateDN:}'.trim()}"
p:validateFilter="#{'%{idp.pool.LDAP.validateFilter:(objectClass=*)}'.trim()}"
- p:bindPoolPassivatorType="%{idp.authn.LDAP.bindPoolPassivator:none}"
+ p:bindPoolPassivatorType="#{'%{idp.authn.LDAP.bindPoolPassivator:none}'.trim()}"
p:prunePeriod="%{idp.pool.LDAP.prunePeriod:PT5M}"
p:idleTime="%{idp.pool.LDAP.idleTime:PT10M}"
p:dnFormat="%{idp.authn.LDAP.dnFormat:undefined}"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list