Login
Login copied to clipboard
ensurePasswordStrength: memory exhausted error
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.
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.