You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Martin Petras (JIRA)" <je...@portals.apache.org> on 2008/01/09 19:10:34 UTC

[jira] Commented: (JS2-817) Cannot login with username with .

    [ 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