c# - Kentico - Using punctuation with AuthenticateUser -


we using version 7.0 of kentico api authenticate users our system.

the following code used gain user details database , authenticate users.

userinfo objuserinfo = authenticationhelper.authenticateuser(username.tolower(), password.tolower(), cmscontext.currentsitename); 

this has been working correctly, having issues usernames , passwords contain of following characters.

" ! @ ' / \ > < * -

is there settings need aware of (web.config or otherwise) stop api accessing account username or password contained special characters?

looks there according documentation. check web.config key:

 <add key="cmsuservalidationregex" value="([a-za-z0-9-]+)" /> 

sets custom regular expression used user name validation (used when new accounts created or when existing usernames modified).

the default value "^[a-za-z0-9_\-\.@]+$".

if cmsensuresafeusernames key set false, following regular expression used default: "^[a-za-z0-9_\-\.\\@]+$".

the thing can't tell 100% if purely ad import of users or users. looks used on call validationhelper.isusername, pretty safe assume in play everywhere.

source: http://devnet.kentico.com/docs/7_0/devguide/index.html?web_config_parameters.htm#forbidden_chars_users

also internal message when try create user characters complains too. tell me in play everywhere.

kentico 7 - create user error message mcbeev


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -