Advertisement:

Author Topic: [Free Plugin] Anti Spam & Protection System  (Read 87497 times)

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #165 on: May 05, 2017, 11:43:10 pm »
you received this mail as plain text or html? At moment i'm using the same template for plain and html

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #166 on: May 05, 2017, 11:47:07 pm »
you received this mail as plain text or html? At moment i'm using the same template for plain and html


X-Mailer: PHPMailer 5.2.21 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #167 on: May 05, 2017, 11:58:11 pm »
you could try to replace this function...


Code: [Select]
function _informUser($email) {
    if ($this->_checkEmail($email)) {
        $ip = $this->_IpUserLogin();
        $user = User::newInstance()->findByEmail($email);
       
        $content   = array();
        $content[] = array('{PAGE_NAME}', '{MAIL_USER}', '{MAIL_USED}', '{MAIL_DATE}', '{MAIL_IP}', '{UNBAN_LINK}', '{PASSWORD_LINK}');
        $content[] = array(osc_page_title(), $user['s_name'], $email, date("Y/m/d H:i", time()), $ip, osc_base_url(true).'?page=sp_activate_account&email='.$email.'&token='.md5($user['s_secret']), osc_recover_user_password_url());
       
        $mail_title = __("False logins on {PAGE_NAME}", "spamprotection");
       
        $mail_body_plain = __('Hello {MAIL_USER},','spamprotection').'\r\n\r\n
'.__('We have detected some false logins for your account {MAIL_USED} on {PAGE_NAME}. Last false login was on {MAIL_DATE} from IP {MAIL_IP}','spamprotection').'\r\n\r\n
'.__('In order to our security policy, we have temporarily disabled your account and banned the used IP in our System. You can use following link to unban and reactivate your Account. If this was not you, please contact the support and change your password. You can use the password recovery function, if you don\'t remember your password.','spamprotection').'\r\n\r\n\r\n
'.__('Unban your account: {UNBAN_LINK} ','spamprotection').'\r\n\r\n
'.__('Password recovery: {PASSWORD_LINK} ','spamprotection').'\r\n\r\n
'.__('Best regards','spamprotection').'\r\n
{PAGE_NAME}';
       
        $mail_body_html = __('Hello {MAIL_USER},','spamprotection').'<br /><br />
'.__('We have detected some false logins for your account {MAIL_USED} on {PAGE_NAME}. Last false login was on {MAIL_DATE} from IP {MAIL_IP}','spamprotection').'<br /><br />
'.__('In order to our security policy, we have temporarily disabled your account and banned the used IP in our System. You can use following link to unban and reactivate your Account. If this was not you, please contact the support and change your password. You can use the password recovery function, if you don\'t remember your password.','spamprotection').'<br /><br /><br />
'.__('Unban your account: <a href="{UNBAN_LINK}">{UNBAN_LINK}</a> ','spamprotection').'<br /><br />
'.__('Password recovery: <a href="{PASSWORD_LINK}">{PASSWORD_LINK}</a> ','spamprotection').'<br /><br />
'.__('Best regards','spamprotection').'<br />
{PAGE_NAME}';


        $title = osc_mailBeauty($mail_title, $content);
        $body_plain  = osc_mailBeauty($mail_body_plain, $content);
        $body_html  = osc_mailBeauty($mail_body_html, $content);


        $params = array(
            'from'      => osc_contact_email(),
            'from_name' => osc_page_title(),
            'subject'   => $title,
            'to'        => $email,
            'to_name'   => $user['s_name'],
            'body'      => $body_html,
            'alt_body'  => $body_plain,
            'reply_to'  => osc_contact_email()
        );
       
        $return = false;
        if (osc_sendMail($params)) {
            $return = true;
        }
       
        return $return;
    }   
}


edit:
at moment i'm working on admin login protection, have made an update check, want to integrate import/export for settings and database, after this i'll take a look on the errors/bugs posted here and publish new version
« Last Edit: May 06, 2017, 08:37:32 pm by Liath »

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #168 on: May 06, 2017, 01:54:11 am »
you could try to replace this function...


Code: [Select]
function _informUser($email) {
    if ($this->_checkEmail($email)) {
        $ip = $this->_IpUserLogin();
        $user = User::newInstance()->findByEmail($email);
       
        $content   = array();
        $content[] = array('{PAGE_NAME}', '{MAIL_USER}', '{MAIL_USED}', '{MAIL_DATE}', '{MAIL_IP}', '{UNBAN_LINK}', '{PASSWORD_LINK}');
        $content[] = array(osc_page_title(), $user['s_name'], $email, date("Y/m/d H:i", time()), $ip, osc_base_url(true).'?page=sp_activate_account&email='.$email.'&token='.md5($user['s_secret']), osc_recover_user_password_url());
       
        $mail_title = __("False logins on {PAGE_NAME}", "spamprotection");
       
        $mail_body_plain = __('Hello {MAIL_USER},','spamprotection').'\r\n\r\n
'.__('We have detected some false logins for your account {MAIL_USED} on {PAGE_NAME}. Last false login was on {MAIL_DATE} from IP {MAIL_IP}','spamprotection').'\r\n\r\n
'.__('In order to our security policy, we have temporarily disabled your account and banned the used IP in our System. You can use following link to unban and reactivate your Account. If this was not you, please contact the support and change your password. You can use the password recovery function, if you don\'t remember your password.','spamprotection').'\r\n\r\n\r\n
'.__('Unban your account: {UNBAN_LINK} ','spamprotection').'\r\n\r\n
'.__('Password recovery: {PASSWORD_LINK} ','spamprotection').'\r\n\r\n
'.__('Best regards','spamprotection').'\r\n
{PAGE_NAME}';
       
        $mail_body_html = __('Hello {MAIL_USER},','spamprotection').'<br /><br />
'.__('We have detected some false logins for your account {MAIL_USED} on {PAGE_NAME}. Last false login was on {MAIL_DATE} from IP {MAIL_IP}','spamprotection').'<br /><br />
'.__('In order to our security policy, we have temporarily disabled your account and banned the used IP in our System. You can use following link to unban and reactivate your Account. If this was not you, please contact the support and change your password. You can use the password recovery function, if you don\'t remember your password.','spamprotection').'<br /><br /><br />
'.__('Unban your account: <a href="{UNBAN_LINK}">{UNBAN_LINK}</a> ','spamprotection').'<br /><br />
'.__('Password recovery: <a href="{PASSWORD_LINK}">{PASSWORD_LINK}</a> ','spamprotection').'<br /><br />
'.__('Best regards','spamprotection').'<br />
{PAGE_NAME}';


        $title = osc_mailBeauty($mail_title, $content);
        $body_plain  = osc_mailBeauty($mail_body_plain, $content);
        $body_html  = osc_mailBeauty($mail_body_html, $content);


        $params = array(
            'from'      => osc_contact_email(),
            'from_name' => osc_page_title(),
            'subject'   => $title,
            'to'        => $email,
            'to_name'   => $user['s_name'],
            'body'      => $body_html,
            'alt_body'  => $body_plain,
            'reply_to'  => osc_contact_email()
        );
       
        $return = false;
        if (osc_sendMail($params)) {
            $return = true;
        }
       
        return $return;
    }   
}


That seems to work just great.

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #169 on: May 06, 2017, 06:38:25 pm »
1.4.1 version from Osclass Market. It seems that ads flagged as spam from the plugin (and not manually) are not deleted (recognised) by Butler plugin. For some reason.

Anyone else ?


It seems that the reason the Butler stopped deleting spam ads is a blocked also user/ad. Not sure why this changed, maybe due to 4.7.3 since i didn't change anything else. We will see ...
« Last Edit: May 06, 2017, 06:55:51 pm by Aficionado »

buninsan

  • Full Member
  • ***
  • Posts: 104
Re: [Plugin] Spam Protection
« Reply #170 on: May 07, 2017, 08:58:38 pm »
On the form of registration and authorization need a trap for bots

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #171 on: May 08, 2017, 07:15:15 pm »
On the form of registration and authorization need a trap for bots
already implemented since 1.5.0

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #172 on: May 09, 2017, 02:47:33 pm »
If it is of any help to Liath, in 1.5.3 the admin edited or moved ads become flagged as duplicate/spam ONLY if the Duplicate check is enabled in the WHOLE ads and NOT per user.


Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #173 on: May 10, 2017, 03:07:54 pm »
Liath one Question: When i manualy flag as spam a listing (not with your plugin), i see the ad is JUST marked as spam. When your plugin marks as spam an ad, it is flagged as spam AND Invalidated. Why is what ?

« Last Edit: May 10, 2017, 03:20:35 pm by Aficionado »

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #174 on: May 10, 2017, 09:24:32 pm »
If it is of any help to Liath, in 1.5.3 the admin edited or moved ads become flagged as duplicate/spam ONLY if the Duplicate check is enabled in the WHOLE ads and NOT per user.
thank you

Liath one Question: When i manualy flag as spam a listing (not with your plugin), i see the ad is JUST marked as spam. When your plugin marks as spam an ad, it is flagged as spam AND Invalidated. Why is what ?
i did it on this way, because in first tests, ads wasnt really disabled, maybe i did something wrong... after fixing all i leave it on this way
« Last Edit: May 10, 2017, 09:46:44 pm by _CONEJO »

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #175 on: May 11, 2017, 07:57:22 pm »
v.1.6.0 is done


New Features
  • Admin Login Protection
  • Registrations check (allow/disallow email provider)
  • Import/Export for settings and/or database
  • Plugin settings (Optional Icon for sidebar, optional buttons in topbar)
  • Optional update check, looks for changes in database
  • Design improved


I didn't found the error because of false flagged spam ads after moving to another category, will change this soon.


@_CONEJO
What was wrong with my last post?

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: [Plugin] Spam Protection
« Reply #176 on: May 11, 2017, 08:07:35 pm »
@_CONEJO
What was wrong with my last post?

The text was really really tiny, just removed the "size" tags

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #177 on: May 11, 2017, 08:09:16 pm »
thank you, sometimes the editor doesnt work properly... normally i edit it by myself, but i must be blind this time  ::)

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #178 on: May 11, 2017, 08:15:51 pm »
1.6b

PHP Fatal error:  Redefinition of parameter $type in /home/public_html/oc-content/plugins/spamprotection/classes/class.spamprotection.php on line 1310

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #179 on: May 11, 2017, 08:28:10 pm »
sorry... fixed now