mflorezm Posted April 10, 2020 Share Posted April 10, 2020 Hello to Everyone: Is there any way to setup a Password Streng Policy without waiting for 1.7.7.x? It will be great to be able to chosee password streng to avoid security issues with user's passwords. See the attached image from Moodle. Thanks and best regards, MFM Link to comment Share on other sites More sharing options...
mflorezm Posted April 10, 2020 Author Share Posted April 10, 2020 BTW, I'm talking about PS 1.7.6.x Is there any way to modify code while waiting for 1.7.7.x that as i understand will include thi by default. Thanks, MFM Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 10, 2020 Share Posted April 10, 2020 You can change the password pattern in "themes/{your_theme}/templates/_partials/form-fields.tpl" file according to your requirements, Please refer to URL below the pattern which you can use to strong password. https://stackoverflow.com/questions/27976446/html-password-regular-expression-validationhttps://www.w3schools.com/tags/att_input_pattern.asp I hope it will help. Link to comment Share on other sites More sharing options...
mflorezm Posted April 11, 2020 Author Share Posted April 11, 2020 Hi, Knowband: Thank you for you answer. What forms should this partial TPL affects? create_account? anything else? I was looking at Prestashop's Github 1.7.7 and they change a lot of files including themes/{your_theme}/templates/_partials/form-fields.tpl https://github.com/PrestaShop/PrestaShop/pull/12824/files/5e88d750a32e62c38dfa90fc91ecaa0a809b9b9e Why do they change several files? Regards, MFM Link to comment Share on other sites More sharing options...
mflorezm Posted April 11, 2020 Author Share Posted April 11, 2020 Hello Everyone: I did the changes manually to the following files like https://github.com/PrestaShop/PrestaShop/pull/12824/files/5e88d750a32e62c38dfa90fc91ecaa0a809b9b9e classes/Customer.php classes/Employee.php classes/Validate.php classes/form/CustomerForm.php classes/form/CustomerLoginForm.php controllers/admin/AdminLoginController.php controllers/front/AuthController.php themes/classic/templates/_partials/form-fields.tpl Now the password policy is: - At least 10 characters - 1 uppercase letter - 1 lowercase letter - 1 digit - 1 special chars Works perfect on 1.7.6.4 Regards, MFM Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 14, 2020 Share Posted April 14, 2020 Great Our solution was only for the HTML5 validation (Client end). The changes which are in the GITHUB are for the server side (which is better in comparison to client side validation). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now