Login icon indicating copy to clipboard operation
Login copied to clipboard

ensurePasswordStrength: memory exhausted error

Open Finetuned opened this issue 9 years ago • 1 comments

It's possible to exceed the php memory limit in a Register snippet with the following settings:

&ensurePasswordStrength=`1`

Add a password field:

<input id="password" type="password" name="password:required:minLength=6" value="[[+password]]" placeholder="minimum 6 characters"/> 

and submit the form without entering any text in the password field.

Removing ensurePasswordStrength from the Register params and the form behaves as expected.

Finetuned avatar Jan 13 '16 13:01 Finetuned

The error is on 402 line of login\controllers\web\Register.php. The cause it strpos of empty variable. I resolved it by adding additional check in ensurePasswordStrength function. I wrapped 343-364 lines into if statement.

Kookabura avatar Mar 14 '17 16:03 Kookabura