Advertisement:

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

Aficionado

  • Guest
Re: [Free Plugin] Anti Spam & Protection System
« Reply #885 on: September 24, 2017, 04:05:52 am »
you are right, but if i can find the concrete issue, maybe i can make it compatible to all versions of mysql and mariadb

https://community.centminmod.com/threads/mysql-5-5-vs-mysql-5-6-vs-mariadb-5-5-vs-mariadb-10-0-feature-compare.3456/

It seems that MariaDB 5.x is more towards Mysql 5.5 and MariaDB 10 more towards Mysql 5.6 ???
« Last Edit: September 24, 2017, 04:10:54 am by Aficionado »

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #886 on: September 24, 2017, 04:29:53 am »
got it
https://mariadb.com/kb/en/library/datetime/


I think it will work fine if you change the type datetime to timestamp
thx Syed


all they are using
  • MySQL Version < 5.6.5
  • MariaDB Version < 10.0.1
and facing this issue should change datetime to timestamp, i don't want to change it generally, to do not add other possible errors there


Quote from: ../assets/create_table.sql

CREATE TABLE IF NOT EXISTS `/*TABLE_PREFIX*/t_spam_protection_ban_log` (
  ...
  `dt_date_banned` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  ...
« Last Edit: September 26, 2017, 03:00:13 am by Liath »

Syed

  • Sr. Member
  • ****
  • Posts: 254
Re: [Free Plugin] Anti Spam & Protection System
« Reply #887 on: September 24, 2017, 09:21:03 am »
all they are using MariaDB Version < 10.0.1 and facing this issue should change datetime to timestamp, i don't want to change it generally, to do not add other possible errors there
Quote from: ../assets/create_table.sql

CREATE TABLE IF NOT EXISTS `/*TABLE_PREFIX*/t_spam_protection_ban_log` (
  ...
  `dt_date_banned` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  ...

I have changed the type datetime to timestamp and installed the plugin without any error, I don't think its a big deal as the affected fields are logs.
I will let you know if any unusual happens.

Regards
« Last Edit: September 24, 2017, 09:33:25 am by Syed »

Syed

  • Sr. Member
  • ****
  • Posts: 254
Re: [Free Plugin] Anti Spam & Protection System
« Reply #888 on: September 24, 2017, 09:28:50 am »

Hi,

Just for your kind information some people use item-send-friend.php for spamming.

Add a feature in your plugin to check email addresses and website urls in subject and message on this form.

Regards

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #889 on: September 25, 2017, 02:00:55 am »
Add a feature in your plugin to check email addresses and website urls in subject and message on this form.
it is added now, but without own settings. It is activated via contact mail settings.






If you want to add it manually, open ../spamprotection/index.php


change
Code: [Select]
if (!osc_is_admin_user_logged_in() && !OC_ADMIN && spam_prot::newInstance()->_get('sp_contact_activate') == '1') {
    $trusted = spam_prot::newInstance()->_isBadOrTrusted(osc_logged_user_id(), 'contacts', 'trusted');
    $bad = spam_prot::newInstance()->_isBadOrTrusted(osc_logged_user_id(), 'contacts', 'bad');   
   
    if ($bad) {
        osc_add_hook('item_contact_form', 'sp_block_baduser_contact');
       
    } elseif (!$trusted) {
        if (spam_prot::newInstance()->_get('sp_contact_honeypot') == '1') {
            osc_add_hook('item_contact_form', 'sp_contact_form');
        }
           
        osc_add_hook('hook_email_item_inquiry', 'sp_check_contact_item', 1);
        osc_add_hook('hook_email_contact_user', 'sp_check_contact_user', 1);
    }
}


to
Code: [Select]
if (!osc_is_admin_user_logged_in() && !OC_ADMIN && spam_prot::newInstance()->_get('sp_contact_activate') == '1') {
    $trusted = spam_prot::newInstance()->_isBadOrTrusted(osc_logged_user_id(), 'contacts', 'trusted');
    $bad = spam_prot::newInstance()->_isBadOrTrusted(osc_logged_user_id(), 'contacts', 'bad');   
   
    if ($bad) {
        osc_add_hook('contact_form', 'sp_block_baduser_contact');
        osc_add_hook('item_contact_form', 'sp_block_baduser_contact');
       
    } elseif (!$trusted) {
        if (spam_prot::newInstance()->_get('sp_contact_honeypot') == '1') {
            osc_add_hook('contact_form', 'sp_contact_form');
            osc_add_hook('item_contact_form', 'sp_contact_form');
        }
           
        osc_add_hook('hook_email_item_inquiry', 'sp_check_contact_item', 1);
        osc_add_hook('hook_email_contact_user', 'sp_check_contact_user', 1);
        osc_add_hook('post_item_send_friend_post', 'sp_check_contact_item', 1);
    }
}
« Last Edit: September 25, 2017, 02:11:47 am by Liath »

TangoX

  • Jr. Member
  • **
  • Posts: 64
Re: [Free Plugin] Anti Spam & Protection System
« Reply #890 on: September 25, 2017, 02:45:58 am »
@Liath Any news on v1.7.5 Stable?

Thanks!

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #891 on: September 25, 2017, 05:59:38 am »
i need to fix two problems first

bamser

  • Newbie
  • *
  • Posts: 9
Re: [Free Plugin] Anti Spam & Protection System
« Reply #892 on: September 25, 2017, 04:20:34 pm »
it's pretty easy :)
http://i.shotnes.com/a/25/sgjgwww4.u02_59c8f4b5d5827.png
..........
sorry did not finish reading
already dismantled the problem, but what is fraught with TIMESTAMP instead
DATETIME?
« Last Edit: September 25, 2017, 04:33:33 pm by bamser »

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #893 on: September 26, 2017, 02:52:19 am »
sorry did not finish reading
already dismantled the problem, but what is fraught with TIMESTAMP instead
DATETIME?


it depends on your MariaDB Version:
got it
https://mariadb.com/kb/en/library/datetime/


This is the complete solution
https://forums.osclass.org/plugins/(plugin)-spam-protection/msg155824/#msg155824
« Last Edit: September 26, 2017, 03:05:55 am by Liath »

Aficionado

  • Guest
Re: [Free Plugin] Anti Spam & Protection System
« Reply #894 on: September 28, 2017, 11:03:21 am »
Liath hi,

You may look also at this please ? Not a major one, still it seems to trigger some firewall rules.

Thanks !!!

/oc-admin/index.php - DOCUMENT_ROOT variable in HTTP request - [POST:sp_files_directory = /home/website.com/]

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #895 on: September 28, 2017, 07:59:50 pm »
thank you for this report, it is already fixed in my version

Aficionado

  • Guest
Re: [Free Plugin] Anti Spam & Protection System
« Reply #896 on: September 28, 2017, 08:01:08 pm »
thank you for this report, it is already fixed in my version

What version is that ? 1.7.4 ?

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Free Plugin] Anti Spam & Protection System
« Reply #897 on: September 28, 2017, 08:08:43 pm »
1.7.5 not available now


want to fix all other issues first

tito

  • issues
  • Sr. Member
  • *
  • Posts: 397
Re: [Free Plugin] Anti Spam & Protection System
« Reply #898 on: September 28, 2017, 11:29:50 pm »
The last times i see ads marked as Spam in the listing list.
But there is no check spam.

If i check the ad there are no stopwords.

But it is a true spamad with links to other websites.

Is this the plugin who does it or is some extra power help me :)

Aficionado

  • Guest
Re: [Free Plugin] Anti Spam & Protection System
« Reply #899 on: September 28, 2017, 11:37:21 pm »
The last times i see ads marked as Spam in the listing list.
But there is no check spam.

If i check the ad there are no stopwords.

But it is a true spamad with links to other websites.

Is this the plugin who does it or is some extra power help me :)

If there is NO Check Spam optiion then the Ad is NOT flagged by Liath's plugin. Manually flagged or by something else.