Password: changing preg_match in PHP Sign up

Issues related to the Login tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html

TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Post Reply
Aris
 
 
Posts: 202
Joined: Wed Aug 28, 2013 9:28 am

Password: changing preg_match in PHP Sign up

Post by Aris »

Hi.

I would wish your advice about two issues.

A. Changing the number of characters that inserted in the password

1.
I would like to change the number of characters that a user must insert in the sign up form.
The PHP code in the Sign up form is the following: ^[A-Za-z0-9_!@$]{1,50}$
I suppose, I can change the range {1,50} to, for example, {6,14}
Tell to me please: Is it correct?

2.
If your answer to question 1 is "YES",
I must change the range on the PHP code:
a. in the HTML object, or
b. In the Password > Editbox > Validate > Data length?


B. Changing the whole preg_match for the password

I see that the default preg_match for the password ^[A-Za-z0-9_!@$]{1,50}$ accepts only these special characters:_!@$

May I change the preg_match from this ^ A-Za-z0-9_!@$]{1,50}$ to this ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,20} ?
Which means:
At least 1 uppercase letter
At least 1 lowercase letter
At least 1 number
At least 1 special character

May be the last preg_match is too difficult for the user or very wordy?

What is your advice?

Thank you.

Aris
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Password: changing preg_match in PHP Sign up

Post by Pablo »

1. Yes, you can change the range that way.
2. You will need to convert the signup object to a standard form then you can edit the code in the HTML object.

Note that there is no support on custom coding. All modifications are at your own risk.
Aris
 
 
Posts: 202
Joined: Wed Aug 28, 2013 9:28 am

Re: Password: changing preg_match in PHP Sign up

Post by Aris »

Thank you, Pablo.
I will follow your advice.
Note that there is no support on custom coding. All modifications are at your own risk.
May be dangerous for the security of my website and the users if I change the preg_match?
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Password: changing preg_match in PHP Sign up

Post by Pablo »

Yes, this may affect the security.
Aris
 
 
Posts: 202
Joined: Wed Aug 28, 2013 9:28 am

Re: Password: changing preg_match in PHP Sign up

Post by Aris »

Pablo, thank you.

Aris
Post Reply