From: <id...@us...> - 2008-10-08 06:10:29
|
Revision: 4827 http://openuss.svn.sourceforge.net/openuss/?rev=4827&view=rev Author: idueppe Date: 2008-10-08 06:10:19 +0000 (Wed, 08 Oct 2008) Log Message: ----------- bug fix - domain name should allways be lower case. Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java 2008-10-07 22:21:05 UTC (rev 4826) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java 2008-10-08 06:10:19 UTC (rev 4827) @@ -29,7 +29,7 @@ public void setName(String name) { // not allowed to overwrite AuthenticationDomain name if (getName() == null) { - super.setName(name); + super.setName(name.toLowerCase()); } } Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java 2008-10-07 22:21:05 UTC (rev 4826) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java 2008-10-08 06:10:19 UTC (rev 4827) @@ -186,7 +186,11 @@ if (user.isCentralUser()) { AuthenticationDomainInfo domain = findDomainByName(user.getDomainName()); - changePasswordUrl = domain.getChangePasswordUrl(); + if (domain != null ) { + changePasswordUrl = domain.getChangePasswordUrl(); + } else { + changePasswordUrl = ""; + } return Constants.FAILURE; } // Handle local user @@ -196,11 +200,12 @@ return Constants.SUCCESS; } + @SuppressWarnings("unchecked") private AuthenticationDomainInfo findDomainByName(String domainName) { // FIXME Refactor into business layer List<AuthenticationDomainInfo> domains = ldapConfigurationService.getAllDomains(); for (AuthenticationDomainInfo domain : domains) { - if (StringUtils.equals(domain.getName(), domainName)) { + if (StringUtils.equalsIgnoreCase(domain.getName(), domainName)) { return domain; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |