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.
also internal message when try create user characters complains too. tell me in play everywhere.
Comments
Post a Comment