[java-identity-provider COMMIT] /trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser....
noreply at shibboleth.net
noreply at shibboleth.net
Thu Oct 17 17:33:17 EDT 2013
Author: scantor
Date: Thu Oct 17 17:33:17 2013
New Revision: 4877
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4877&view=rev
Log:
Allow for empty whitelist.
Modified:
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java
Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java?rev=4877&r1=4876&r2=4877&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java Thu Oct 17 17:33:17 2013
@@ -166,7 +166,7 @@
*/
private boolean isAuthenticated(@Nonnull @NotEmpty final String username) {
- if (!whitelistedUsernames.contains(username)) {
+ if (!whitelistedUsernames.isEmpty() && !whitelistedUsernames.contains(username)) {
// Not in whitelist. Only accept if a regexp applies.
if (matchExpression == null) {
return false;
@@ -174,7 +174,7 @@
return matchExpression.matcher(username).matches();
}
} else {
- // In whitelist. Check blacklist, and if necessary a regexp.
+ // In whitelist (or none). Check blacklist, and if necessary a regexp.
return !blacklistedUsernames.contains(username)
&& (matchExpression == null || matchExpression.matcher(username).matches());
}
More information about the commits
mailing list