Creating usernames with a 't' comes up as an invalid character.
ikogan - September 25, 2009 - 19:45
| Project: | HTPasswd Sync |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | m.fu |
| Status: | closed |
Jump to:
Description
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.

#1
I am integrating the patch right now.
Please note the the correct regex is '[[:space:]]'
should be released shortly.
Thanks for the patch.
#2
fixed in v1.3
#3
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.
#4
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.
#5
CVS version is now released.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.