thefrenchgame Posted June 26, 2019 Share Posted June 26, 2019 Hello, I have been receiving for a month 30 fake users per day creating customer account on my prestashop. I need to delete them manually each time. Do you know how I can stop these attacks ? I attach a printscreen of the type of fake customers. My prestashop is 1.6.1.6. Thanks in advance. Link to comment Share on other sites More sharing options...
Daresh Posted June 27, 2019 Share Posted June 27, 2019 Update your shop, it's a known problem. Link to comment Share on other sites More sharing options...
prestamonste Posted June 27, 2019 Share Posted June 27, 2019 Hi there, There are 2 ways to fix this error. 1. Update your shop to the last version 2. Change the PS core: Open file public_html/classes/Customer.php change validate lastname, firstname from name to isCustomerName & save file Open class public_html/classes/Validate.php: Add the new function to validate customer name & save file & go to front end and double test public static function isCustomerName($name) { $validityPattern = Tools::cleanNonUnicodeSupport( '/^(?:[^0-9!<>,;?=+()\/\\@#"°*`{}_^$%:¤\[\]|\.。]|[\.。](?:\s|$))*$/u' ); return preg_match($validityPattern, $name); } Hope that helps! Link to comment Share on other sites More sharing options...
thefrenchgame Posted June 27, 2019 Author Share Posted June 27, 2019 unfortunately, i prefer not to update the shop as it would make many changes on my e-shop that I have no development skills to solve Is there anyother way to suppress spam attack without updating the site ? Thanks Link to comment Share on other sites More sharing options...
Daresh Posted June 27, 2019 Share Posted June 27, 2019 Yes, you need to update Customer.php and Validate.php files, search the forum as this was discussed many times. Link to comment Share on other sites More sharing options...
cah.carvalho Posted January 23, 2020 Share Posted January 23, 2020 I changed both files exactly like the images, but I was not able to include a regular customer also. shows customer name and customer last name invalid. Any solution please??? 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