Where are my glasses?
Posts: 22
176 credits Members referred : 0
« on: Jul 09, 2006, 10:16:42 PM »
I'm interested in restricting the password chars (to alpha-numeric, no "special" char), and maybe increase the min length to 6. Where in the class should I be looking?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6274
38470 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Jul 10, 2006, 09:26:33 AM »
Hello,
modifying a open source class is not useful because you have to add your custom modifications to later updates too.
just try to add this regex test into you php code (or write some class extension):
Code:
<?php if (preg_match("/[a-z0-9]{6,}/i", $password) { // do something } else { echo "bad password"; }
Where are my glasses?
Posts: 22
176 credits Members referred : 0
« Reply #2 on: Jul 15, 2006, 08:53:30 AM »
I did find the place in the class, I don't know how I missed it when I first looked. It occures to me that password restrictions might be something many people might want, maybe a list of spacific char that are "bad" that could be specified as an array in the configureation. Some characters have no place in passwords, and lend themselves to SQL injection...
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6274
38470 credits Members referred : 374
I did find the place in the class, I don't know how I missed it when I first looked. It occures to me that password restrictions might be something many people might want, maybe a list of spacific char that are "bad" that could be specified as an array in the configureation. Some characters have no place in passwords, and lend themselves to SQL injection...
I don't think so, I use often passwords with not alphanumerical characters because these passwords are more safe.
An injection is impossible because the password is saved in MD5 encoding, all posted values are prepared to get sql injections, check this function: