portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Petras (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Commented: (JS2-817) Cannot login with username with .
Date Wed, 09 Jan 2008 18:10:34 GMT

    [ https://issues.apache.org/jira/browse/JS2-817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557364#action_12557364
] 

Martin Petras commented on JS2-817:
-----------------------------------

Sorry for responding so late. 

In my opinion is the best solution to add a property to Jetspeed.properties:
security.user.validating.regex=.*\\(.*|.*\\[.*|.*\\{.*|.*\\\\.*|.*\\^.*|.*\\$.*|.*\\|.*|.*\\).*|.*\\?.*|.*\\*.*|.*\\+.*|.*\\..*


and then change method org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao.validateUid(String)
by replacing line
  String pattern = ".*\\(.*|.*\\[.*|.*\\{.*|.*\\\\.*|.*\\^.*|.*\\$.*|.*\\|.*|.*\\).*|.*\\?.*|.*\\*.*|.*\\+.*|.*\\..*";

with
  String pattern = Jetspeed.getConfiguration().getString("security.user.validating.regex",
".*\\(.*|.*\\[.*|.*\\{.*|.*\\\\.*|.*\\^.*|.*\\$.*|.*\\|.*|.*\\).*|.*\\?.*|.*\\*.*|.*\\+.*|.*\\..*");

I've checked it, it works well. Please apply this patch.

> Cannot login with username with .
> ---------------------------------
>
>                 Key: JS2-817
>                 URL: https://issues.apache.org/jira/browse/JS2-817
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 2.1.2, 2.1.3
>            Reporter: Martin Petras
>
> There is an validator for username in
> org.apache.jetspeed.security.spi.impl.ldap.AbstractLdapDao.validateUid(String)
> I need to login with username:  name.surname but in the method there is a pattern for
validating which contains dot.
> String pattern = ".*\\(.*|.*\\[.*|.*\\{.*|.*\\\\.*|.*\\^.*|.*\\$.*|.*\\|.*|.*\\).*|.*\\?.*|.*\\*.*|.*\\+.*|.*\\..*";
> It is possible to externalize this string to a configuration file?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message