-

Planned change to the SFS API

Support for phpBB3, phpBB3 Modifications, and phpBB3 styles
Forum rules
Bugs go in the Bug Tracker

Planned change to the SFS API

Postby Thyme Lawn » Thu Mar 08, 2012 12:24 pm

It is almost certain that submissions to the SFS database will have to include evidence in the not too distant future. Are there any plans to modify Anti-Spam ACP's One-Click Ban process to provide an evidence submission mechanism?
Thyme Lawn
Donor
Donor
 
Posts: 3
Joined: Thu Apr 28, 2011 11:18 am
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby EXreaction » Fri Mar 09, 2012 2:59 pm

I dont see anything on their website saying that the evidence field will be required for submission in the future, or what they are even looking for specifically in the field. Do you have any more information on it?
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: Planned change to the SFS API

Postby Thyme Lawn » Fri Mar 09, 2012 4:31 pm

The most recent mention I can find (by one of the admins) is here.
Also, getting into the habit of submitting evidence is a good idea since we're moving toward mandatory evidence for submissions very soon.
Thyme Lawn
Donor
Donor
 
Posts: 3
Joined: Thu Apr 28, 2011 11:18 am
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby EXreaction » Fri Mar 09, 2012 8:20 pm

I think that making changes to support submitting evidence is going to require changing the way the submission system works completely. Banning the user from their profile, as this mod does, does not really have any data on it that will be ban-able. Users are mostly banned from spam posts, so it would need some way of collecting post data or whatever to ban them and send that, something that could be complicated, especially if they only post in some modification to the board since that can't be loaded automatically.

The only option I can see to keep the SFS submission if that field will be required will be to just have an extra required field shown on the page where the user can enter evidence themselves, I don't have the time to make a better implementation than that.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: Planned change to the SFS API

Postby Thyme Lawn » Sat Mar 10, 2012 2:35 am

User screening and modification of the evidence before submission is definitely required, so it would be great if that could be done. Even better if you could automatically load the profile information and signature code into the new field.

There is an 8000 character limit on the evidence but I doubt if anyone's likely to hit that.

My understanding of the submission change is that index.php would change to something like the following patch:
Code: Select all
--- root\antispam\index.php   2011-06-18 22:19:56.000000000 -0000
+++ root\antispam\patched_index.php   2012-03-10 09:54:48.000000000 -0000
@@ -253,30 +253,38 @@
             $db->sql_query($sql);
          }
 
          // Submit the information to Stop Forum Spam
          if (isset($_POST['sfs_submit']) && $config['asacp_sfs_key'])
          {
-            $data = array(
-               'username'   => $user_row['username'],
-               'email'      => $user_row['user_email'],
-               'ip_addr'   => $user_row['user_ip'],
-               'api_key'   => $config['asacp_sfs_key'],
-            );
+            if (empty($evidence))
+            {
+               $data = array(
+                  'username'   => $user_row['username'],
+                  'email'      => $user_row['user_email'],
+                  'ip_addr'   => $user_row['user_ip'],
+                  'api_key'   => $config['asacp_sfs_key'],
+               );
+            }
+            else
+            {
+               $data = array(
+                  'username'   => $user_row['username'],
+                  'email'      => $user_row['user_email'],
+                  'ip_addr'   => $user_row['user_ip'],
+                  'api_key'   => $config['asacp_sfs_key'],
+                  'evidence'   => $evidence
+               );
+            }
 
             $errno = $errstr = '';
             $domain = 'www.stopforumspam.com';
             $fp = @fsockopen($domain, 80, $errno, $errstr, 5);
             if ($fp)
             {
-               $post = '';
-               foreach ($data as $name => $value)
-               {
-                  $post .= "&$name=$value";
-               }
-               $post = substr($post, 1);
+               $post = http_build_query($data);
 
                 $out = "POST /add HTTP/1.0\r\n";
                 $out .= "Host: $domain\r\n";
                $out .= "Content-Type: application/x-www-form-urlencoded\r\n";
                 $out .= 'Content-Length: ' . strlen($post) . "\r\n\r\n";
                 $out .= "$post\r\n";

I've put the evidence after the API key in the patch to avoid any problems if it happens to contain the sequence "&api_key=".

http_build_query() does the same as your foreach loop, applying urlencode() to each of the $data array elements. If you'd prefer to stick with the current code the line in the loop would have to be changed to:
Code: Select all
                  $post .= "&$name=urlencode($value)";
Thyme Lawn
Donor
Donor
 
Posts: 3
Joined: Thu Apr 28, 2011 11:18 am
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby Obsidian » Sat Mar 10, 2012 9:22 am

EXreaction wrote:I dont see anything on their website saying that the evidence field will be required for submission in the future, or what they are even looking for specifically in the field. Do you have any more information on it?


We're currently planning for evidence to be required as of July 1st of this year (date not COMPLETELY firm yet); no announcement has been posted as of yet because we're still working out some kinks with the roll-out.

I can guarantee that it will happen though. We've been having issues left and right with false reporting and "troll" submissions - many of which could be easily identified with mandatory evidence.

After an incident occurred with someone blatantly admitting to a "troll" submission (literally, the evidence field said "They trolled my site"), we ended up having to nuke someone's reporting key; you can see the results what occurred in our announcements forum - specifically, the new topic regarding domains who have had their API keys revoked.

So, tl;dr: No hard date guaranteed, but the change itself IS guaranteed. Alas, necessary evil.
User avatar
Obsidian
Donor
Donor
 
Posts: 2
Joined: Tue Oct 13, 2009 9:45 pm
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby Obsidian » Sat Mar 10, 2012 11:27 am

I should also note that it may be worth looking into leveraging the newly-added "confidence" score returned by the API for future versions.

I'd link to the reveal of the feature and how to use it, but your spam "detection" on the board is crap with allowing legitimate users to use links.
User avatar
Obsidian
Donor
Donor
 
Posts: 2
Joined: Tue Oct 13, 2009 9:45 pm
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby EXreaction » Mon Mar 12, 2012 4:06 pm

I'll post the link for now and fix the issues, when I get some time I'll read over everything here more thoroughly.

EXreaction wrote:I dont see anything on their website saying that the evidence field will be required for submission in the future, or what they are even looking for specifically in the field. Do you have any more information on it?

We're currently planning for evidence to be required as of July 1st of this year; no announcement has been posted as of yet because we're still working out some kinks with the roll-out.

I can guarantee that it will happen though. We've been having issues left and right with false reporting and "troll" submissions - many of which could be easily identified with mandatory evidence.

I posted something a little while ago about it here: http://www.stopforumspam.com/forum/view ... hp?id=3664

After an incident occurred with someone blatantly admitting to a "troll" submission (literally, the evidence field said "They trolled my site"), we ended up having to nuke someone's reporting key, and OnThePike posted this: http://www.stopforumspam.com/forum/view ... hp?id=3956

So, tl;dr: No hard date guaranteed, but the change itself IS guaranteed.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: Planned change to the SFS API

Postby jsebean » Tue Mar 27, 2012 5:31 am

EXreaction wrote:I'll post the link for now and fix the issues, when I get some time I'll read over everything here more thoroughly.

EXreaction wrote:I dont see anything on their website saying that the evidence field will be required for submission in the future, or what they are even looking for specifically in the field. Do you have any more information on it?

We're currently planning for evidence to be required as of July 1st of this year; no announcement has been posted as of yet because we're still working out some kinks with the roll-out.

I can guarantee that it will happen though. We've been having issues left and right with false reporting and "troll" submissions - many of which could be easily identified with mandatory evidence.

I posted something a little while ago about it here: http://www.stopforumspam.com/forum/view ... hp?id=3664

After an incident occurred with someone blatantly admitting to a "troll" submission (literally, the evidence field said "They trolled my site"), we ended up having to nuke someone's reporting key, and OnThePike posted this: http://www.stopforumspam.com/forum/view ... hp?id=3956

So, tl;dr: No hard date guaranteed, but the change itself IS guaranteed.


So you'll be adding the evidence field in One Click ban if one click to report to stop forum spam?
jsebean
Donor
Donor
 
Posts: 4
Joined: Sat Mar 20, 2010 2:51 pm
Blog: View Blog (0)

Re: Planned change to the SFS API

Postby EXreaction » Tue Mar 27, 2012 11:37 am

That is a copy of what Obsidian tried posting and was not able to.

I will be looking into it when I get an opportunity in the future, the next few weeks at least I've got too much work going on.
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Next

Return to phpBB3 Support



Who is online

Users browsing this forum: Baidu [Spider], dfhhjqwe31, erkangi99, fgdgfdb82g, fz4b72013, shabi2270 and 2 guests