Creating a new account and using a username with a 't' in the name returns "The username contains an illegal character, like , :." The regular expression test in _htpasswdsync_validate() on line 339 of htpasswdsync.module does not work. Instead of sing "\t", using [[:space:]] works for all whitespace. That makes the check simply [:[[:space:]]]:

333c333
<     if (ereg('[ :\t]', $edit['name'])) {
---
>     if (ereg('[:[[:space:]]]', $edit['name'])) {

Note: I have not tested this extensively but it *seems* to work.

Comments

m.fu’s picture

Assigned: Unassigned » m.fu

I am integrating the patch right now.
Please note the the correct regex is '[[:space:]]'
should be released shortly.
Thanks for the patch.

m.fu’s picture

Status: Active » Fixed

fixed in v1.3

ikogan’s picture

Thanks for integrating that fix. I didn't think that [[:space:]] includes colons, hence the [:[[:space:]]], so we get all manner of whitespace as well as colons.

m.fu’s picture

Status: Fixed » Active

sorry you are right, I missed the colon. But the first regex did not match properly spaces. I'll see to correct that in the CVS version. Tell me if you need a release.

m.fu’s picture

Status: Active » Fixed

CVS version is now released.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.