
A client is getting lots of “Russian” looking spam in his contact us form. I edited this file.
web/catalog/controller/information/contact.php
In the validate section, which starts like this;if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
Just before this line;
$mail->setText($this->request->post['enquiry']);
Add this code block
if (preg_match("/\p{Cyrillic}+/u", $this->request->post['enquiry'])) {
$log = new Log('error.log');
$log->write('Cyrillic characters found in the enquiry field: ' . $this->request->post['enquiry']);
exit;
}
Leave a Reply