1.0.9 Limit length in ID and Password

Matias-

New Member
May 18, 2017
18
1
3
24
Hello, it turns out that my db has a maximum length of 10 for each password as maximum ... But webengine has up to 32 or 50, I do not know ... From where I edit so that only I can write up to 10 or 12 characters? I tried to modify the DB and leave the table like this:



But it does not work...
 

Lautaro

Administrator
Developer
Dec 19, 2012
560
234
43
  • Like
Reactions: Daezugun

eynnad

Member
Premium Member
Aug 21, 2014
115
8
18
How to limit the length of the password in Change Password?
 

Insta

New Member
Jul 21, 2017
18
1
3
Don't edit the database tables.

By default WebEngine allows alphanumeric users 4 to 10 characters in length and password of 4 to 32 characters in length.
To change that open the file class.validator.php

Username setting can be found on line 88:
https://github.com/lautaroangelico/WebEngine/blob/master/includes/classes/class.validator.php#L88

Password setting can be found on line 96:
https://github.com/lautaroangelico/WebEngine/blob/master/includes/classes/class.validator.php#L96
[QUOTE"]
public static function UsernameLength($string){
if((strlen($string) < config('username_min_len',true)) || (strlen($string) > config('username_max_len',true))) {
return false;
} else {
return true;
}
}

public static function PasswordLength($string){
if((strlen($string) < config('password_min_len',true)) || (strlen($string) > config('password_max_len',true))) {
return false;
} else {
return true;
}
}
[/QUOTE]

I also have a problem like this..I don't know what to edit in the above code to make it work.

Output: "The password length can be 4 to 32 characters. "

max of 10 characters are accepted. if you go above 10 it will show that error.
 
Last edited: