Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting minimum password length

I'm trying to set a minimum password lenght for a login page; however, it seems that the only attribute the password (input) tag has is maxlength. I know you can use the new pattern or min attribute, but I need something that works in IE 9. Is there a simple/replacement way to solve this or will I have to use strlen?

like image 741
Llama Avatar asked Jun 15 '26 09:06

Llama


1 Answers

Some Ok answers so far.

However, this is much more a concern server-side than client. I would not be difficult to "hack" the markup or Javascript to allow a short password.

You should always check server-side as well to make sure nothing weird is going on.

To sum it all up: Use Javascript to make sure the password is longer than the minimum length and recheck it server-side to make sure the jsfunction was not bypassed in any way.

like image 178
OptimusCrime Avatar answered Jun 17 '26 22:06

OptimusCrime



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!