SimplePortal

Support => English Support => Topic started by: dicechild on January 01, 2015, 01:47:45 PM

Title: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 01, 2015, 01:47:45 PM
Using SMF 2.0.8
Using SP 2.3.5

The shoutbox on our site is being bombarded about once a day by jibberish and links. Having pruned this several times I cannot seem to find the ip of a guest using the shoutbox. If there is a way to easily access this list then I have been daft in finding it. The user that is spamming the shoutbox does not appear to be posting in the forums, so I cannot find them that way.

Thank you,

DC
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 01, 2015, 02:12:30 PM
dicechild,
You can always adjust the permissions for the block not to allow guests and/or your new members membergroup viewing/using the shoutbox block.



Another option that may interest you:
You can use the extra shoutbox permissions plug-in to have more control over shoutbox function.
ref. http://simpleportal.net/index.php?topic=11714.0
Make sure to install SP-xtra_shout-perms_v1.21x.zip
The extra settings this modification adds apply to all shoutboxes and are accessable within membergroup permissions.


Regards.

Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 01, 2015, 02:18:24 PM
I have discussed such a fix with the other admins, but they would like to keep the box available for guest use. Thank you though.
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 01, 2015, 02:24:00 PM
dicechild,

  Do you have a mebergroup specifically for members with a very low post count (ie. Newbie)?
If so then you can install the plugin and adjust that membergroup so it does not have the ability to post links.

I think the plug-in does not enable options by default (rather it disables them) therefore if you do use the plugin you will have to go through each membergroup permissions and adjust their Simple Portal shoutbox permissions accordingly.
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 01, 2015, 03:33:27 PM
Chen,

I agree that we can adjust the Newbie permissions so that they cannot post links, but that does not keep guests from spamming the chat at all... It would prevent some of what we are running into, but not all. Is there perhaps a way to collect IP activity on the shoutbox for a specific time period such that I can actually ban specific IP?

Thank you for the help so far.

DC
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 01, 2015, 04:09:32 PM
dicechild,

  Guests can not post messages in the Simple Portal shoutbox. Did you install a plug-in or manually adjust the code to be able to enable that option? Is this the actual Simple Portal shoutbox you are talking about or perhaps another 3rd party shoutbox that you are using within a block?
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 01, 2015, 06:03:19 PM
Chen,

I'm not entirely sure about plug-ins or coding, but it is definitely the SP shoutbox and we are using SP version 2.3.5 as per the original post. I cannot see anything that would indicate it is using a plug-in, but I have not been around since the original coding. There is a fairly simple dropdown which indicates I can restrict it, but the limitations are fairly basic. For instance I can set it to members only, but that isn't what I would prefer.

Is there an easy way for me to determine the non-SP formatting that has been done?

Thanks!

DC
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 02, 2015, 02:18:25 AM
dicechild,

  Please note that there were security improvements and fixes for the shoutbox with Simple Portal 2.3.6. I am advising you to uninstall version 2.3.5, delete it and then upload/install version 2.3.6.
You should also run the upgrade package for your forum installation which the current version is 2.0.9 (<-- this simply involves a patch).

  You'll have to excuse me for possibly not understanding exactly what you are referring to here and I would like to make sure we are talking about the same thing.

  Normally guests are only able to view the shoutbox and not post anything in it (if permissions are set as such).
Guests which are people that are not actually logged into your forum are able to post links and/or content into the shoutbox?

 
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 02, 2015, 06:11:57 AM
Chen,

You are correct in that the guests I am talking about are not logged into the forum. This is where I am really running into issues because I have repeatedly suggested to other admins that we make it members only, but I have been overruled. I cannot seem to find any guest information based on their shoutbox posting though, so I am currently manually pruning when there is spam.

Thank you,

DC
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 02, 2015, 12:16:53 PM
dicechild,

  Since guests normally do not have the ability to post in the Simple Portal shoutbox, it is in my opinion that someone with ftp access on the forum to which you speak of has altered the code somehow to allow this to occur. Whether it be Simple Portal code that has been altered or SMF code itself is unknown to me at this time but from the issue that you describe I can only surmise this is the case especially since your other co-admin(s) seem to want guests to post in that shoutbox (Imo - whomever is stressing this behaviour is most likely the one who changed it to allow guest shouts).
 
 If for some reason someone has allowed this by altering the code and wishes it to continue then the only resolve I have for you is for me to alter the code to not allow guests to post links if that is the shoutbox behaviour you seek.

  This is assuming that you are actually using the Simple Portal shoutbox and not another 3rd party shoutbox within a Simple Portal PHP or HTML block to initiate it. If you are absolutely sure it is the Simple Portal shoutbox being used and want this behaviour then attach your PortalShoutbox.php file that is located in your website Sources folder and I can alter it to disallow the user group of guests to post links. 

Regards.
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: dicechild on January 02, 2015, 03:17:22 PM
Ok, before I can alter code I will chat with the other admins and see if they are all right with such action.

Thanks for the help so far though.

DC
Title: Re: How to gather and ban guest ip from simpleportal shoutbox site (Anti-Spam)
Post by: Chen Zhen on January 02, 2015, 05:28:52 PM
dicechild,

  Most likely they extrapolated edits from the following topic: http://simpleportal.net/index.php?topic=9834.0
... even though the edits are not in exactly the same files since Simple Portal has evolved, the concept does work.
Imo this is what someone who admins on the forum you speak of has done or perhaps had someone else perform the necessary edits.

If this is the case then indeed I can help you to not allow guests to post links within the shoutbox.
If the person that performed the editing to allow guests to use the shoutbox wishes to make the necessary edit, it is shown below else you can attach the file I requested and I will do the edit for you.


file: ../Sources/PortalShoutbox.php

find:
Code: [Select]
sportal_create_shout($context['SPortal']['shoutbox'], $_REQUEST['shout']);

replace with:
Code: [Select]
if ($user_info['is_guest'])
{
$search = array('/\[url\](.*?)\[\/url\]/is', '/\[url\=(.*?)\](.*?)\[\/url\]/is', '/\<a(.*)\>(.*)\<\/a\>/iU', "/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))/");
$_REQUEST['shout'] = preg_replace($search, "$2", $_REQUEST['shout']);
}
sportal_create_shout($context['SPortal']['shoutbox'], $_REQUEST['shout']);

Regards.
SimplePortal 2.3.8 © 2008-2024, SimplePortal