Needs work
Project:
HTPasswd Sync
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2012 at 16:48 UTC
Updated:
3 Jun 2012 at 16:22 UTC
Email address are a valid format for the name in an htpasswd file and in a user name in Drupa. l use email addresses as the user name in my Drupal installations but they are clean so that someone@null.com becomes someonenullcom in the htpassword file.
The solution is to make line 59 in function preg _htpasswdsync_sanatize_name in HTPasswdSync.module more liberal by changing it to match the line below.
$name = trim(preg_replace('/[^\w\s@\.]/i', '', $name), " \t\n\r");
You will notice I added @ and . to the character set in the regular expression.
Comments
Comment #1
boardcomputer commentedHi, thanks for the solution, used it, because our usernames including dots (".") as a standard for naming convention. otherwise this will rename the users for the htaccess authentication. maybe it could be an option to let the users customize this via a form field. At all, from my point of view this needs to be pushed to the produtive code.
Thx and BR!