- Details
- Written by: Mr. Admin
File: components/com_engage/src/Model/CommentModel.php
Edit: 15-Mar-2023
Insert the following code snippet after the spam test in the 'PrepareTable' function.
// Check the email address is not one of the usual suspects - mark as spam to delete
$bad_text = array('.xyz', '.site', '.pl', '.ru', '.cn', This email address is being protected from spambots. You need JavaScript enabled to view it. ');
foreach ($bad_text as $t) {
if (str_ends_with($table->email, $t)) {
$table->enabled = -2;
if (class_exists('Akeeba\Engage\Admin\Model\Exception\BlatantSpam')) {
throw new BlatantSpam();
}
throw new RuntimeException('Your comment has been identified as a blatant spam and was discarded without further consideration.');
break;
}
}
Ver 3.1.x -> 3.2.x
Line 310
Edit: 13-Feb-2023
Add test for '.site' TLD in the same test
if ((in_array(true, $spamResults, true)) || (str_ends_with($table->email, '.xyz')) || (str_ends_with($table->email, '.site')))
{
$table->enabled = -3;
}
Add a simple test for '.xyz' email TLD, assume it is a fake then flag it as spam.
if ((in_array(true, $spamResults, true)) || (str_ends_with($table->email, '.xyz')))
{
$table->enabled = -3;
}