Link to the mod (https://custom.simplemachines.org/index.php?mod=4311)
I've just noticed four packages with the same name but with different extensions and size, I think it could be confusing.
sfs_packages.jpg
Sorry thats a bug with the customize site. I've fixed it manually.
Quote from: SleePy on March 21, 2022, 12:11:09 AMThis customization adds support for detecting spam by using the Stop Forum Spam API.
I don't see an option to add my API#. Do we not need that anymore?
I really liked the ability to check each member individually in the 2.0 version! Any chance to bring that back, I mean add it to the 2.1 version?
Thanks,
Shades 8)
You only need a API key to add submissions, not query them.
I didn't need the ability to check each member, but it could be done.
I like that mod!
But I also miss the ability to check and report members in the member list.
I had that built in the old mod, but the function to check multiple members I failed for 2,1,x.
Maybe you can implement that.
I have installed the mod for SMF 2.0.19. Unfortunately it does not work. It installs without error messages, but the settings are missing.
The log_sfs table was created.
In the package-info.xml is that:
<require-file name="StopForumSpam.php" destination="$sourcedir" />
However, the file StopForumSpam.php does not exist in the package.
I forgot to reset 2.0 after I renamed the files. I'm working on the ability to submit and view from the profile. I ran out of time to finish up testing, but should have something soon. Can been seen here: https://github.com/jdarwood007/smfmod_sfs
I have installed the version 1.1 for SMF 2.0.19
The installation works, but when it redirects to the settings page after installation I get a white screen and this error:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /var/www/vhosts/sntest01.schreibs.net/httpdocs/Sources/SFS.php on line 46
What version of PHP do you have?
Unfortunately an old
5.5.38
I thought that 2.0.19 had a minimum version of 5.6 anyway.....
Quote from: Kindred on March 29, 2022, 08:34:23 AMI thought that 2.0.19 had a minimum version of 5.6 anyway.....
According to the requirements page, 2.0.19 can run on a php version starting from 5.3.
https://download.simplemachines.org/requirements.php
Quote from: Matthias on March 29, 2022, 06:53:02 AMUnfortunately an old
5.5.38
I have not seen the code for this mod, but from the error message you are getting it looks like it does not support the php version that you are using.
A bit off topic, but may I ask why you are running such an older version of php? It contains many security issues, not to mention the bugs.
On the server I can no longer update the PHP version. I need a new server.
Until now everything has always worked, so I said to myself, I'll do sometime...
Return type declarations were introduced in PHP 7, so the error is indeed due to an old version of PHP.
Yea, I have return types in here and a few other PHP 7 features. I would recommend upgrading to at least 7.1. SMF 2.0 will work all the way up to 7.4.
Under Profile>Track Stop Forum Spam "IP Address" is showing twice...
sfs.png
Technically no. There is ip_address and ip_address2 (proxy check ip). I can in a future update maybe have it show the IP in parenthesis.
SMF 2.0.19; Mod Version 1.1
Here's what I noticed:
There is an input field, but no description of what the field is for.
(https://up.picr.de/43540170jo.jpg)
Quote from: Matthias on May 04, 2022, 07:15:00 AMThere is an input field, but no description of what the field is for.
Good catch! I have the same in 2.1.1! ???
All fixed up. It was a rename of things due to a complex SMF bug that won't be fixed in 2.1..
OK so I am running httpBL (but thats becoming problematic so I have been looking for alternatives especially for when I upgrade to 2.1)
Is anyone running this succesfully with demonstrated results on 2.0.19?
If so I may install this on the existing forum.
Is this mod (v1.2) also compatible with SMF 2.1.2?
I am not aware of any compatibility issues.
Hi, Really appreciating this Mod, on the whole it works great.
However, I recently had a person want to use the username Jason and it wouldn't let him.
It led me to realise I didn't understand this setting:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmetaltype.co.uk%2Fforum22%2Fsfs.png&hash=32eb88469e9c990263d6ba675de6ae25f630ead3)
I've now disabled the check username option to allow him to use the board.
Would changing that number do anything?
Would checking the box further down in the settings that says ignore wildcard username checks be a better option than disabling username checks?
Sorry to ramble on a bit, just wondering what the best option is.
?? ??
You can set reserved names in the core software. Separate from this mod
https://www.stopforumspam.com/search?q=Jason
You can see that "Jason" has been reported many times. The Confidence level is returned by the API for how much it believes "Jason" is likely a spammer. I realize that the Stop Forum web site doesn't show the confidence level, only the API.
http://api.stopforumspam.org/api?username=Jason&json
You can see by the API test, it is reporting it as 72.73 right now. You can set it to 75 right now and it would let Jason through. If you notice more spammers are getting through using more common spammer names, you can lower the threshold.
If you check the ignore wildcard usernames, it sends to the API to do exact match for "Jason", but it doesn't seem to change anything here.
If you are wondering more about data that is received by the mod, you can enable the debugging of SFS requests, to see all the data as returned by the API. This is not really meant to run in production, but can help answer questions about the data being received.
Screen Shot 2022-05-17 at 6.56.32 PM.png
Thanks for the prompt reply. Changed setting to 75, everything OK for now.
Thanks
Is not the default setting for the box labeled 'Check Username?' set to unchecked?
And if so, wouldn't it let anyone's names through provided the other criteria aren't met?
And lastly, do you recommend leaving the box unchecked?
Its not checked by default. As seen, it can produce false positives. But if you are getting hit hard, it may be worth trying to enable it and see if it helps curve spammers. You may want to disable the wildcard matching as I indicated, it will match any name on partials.
Thanks SleePy. :)
For SMF 2.0 this mod cannot be uninstalled because of an error in the package file 'sfs_hooks_remove.php' - there is a comma missing at the end of the second last hook name.
The only way I could uninstall the mod was to delete the previous package file from the './Packages' directory/folder and upload a new package file that contains a fixed version of 'sfs_hooks_remove.php'.
Find:
'integrate_manage_logs' => 'SFSA::hook_manage_logs'
Replace with
'integrate_manage_logs' => 'SFSA::hook_manage_logs',
All fixed up in v1.3 Fixed a issue with the tracking page as well not showing details like it was supposed to and a undefined index issue on logs.
Right after I install this mod I got this error:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/me/forum/Sources/SFS.php on line 46
How do I fix this, or how do I uninstall this mod manually? Can't find install guide anywhere.
2.0.19, PHP 7.3.27.
Quote from: Мel on June 24, 2022, 01:28:26 PMRight after I install this mod I got this error:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/me/forum/Sources/SFS.php on line 46
How do I fix this, or how do I uninstall this mod manually? Can't find install guide anywhere.
2.0.19, PHP 7.3.27.
A mod broke my forum (https://wiki.simplemachines.org/smf/A_mod_broke_my_forum)
Also, can you bump up your PHP any higher than 7.3.x?
Quote from: Doug Heffernan on June 24, 2022, 01:47:40 PMQuote from: Мel on June 24, 2022, 01:28:26 PMRight after I install this mod I got this error:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/me/forum/Sources/SFS.php on line 46
How do I fix this, or how do I uninstall this mod manually? Can't find install guide anywhere.
2.0.19, PHP 7.3.27.
A mod broke my forum (https://wiki.simplemachines.org/smf/A_mod_broke_my_forum)
Somehow it's not fixing the issue, tried it several times.
Quote from: Steve on June 24, 2022, 01:57:54 PMAlso, can you bump up your PHP any higher than 7.3.x?
I can ask my hosting provider. Should it work?
I don't know that it has anything to do with it but you're on a deprecated version.
Likely the mod requires 7.4 for its new features. Can't confirm as on mobile but the error is suggestive to me.
I see.
Quote from: Steve on June 24, 2022, 01:57:54 PMAlso, can you bump up your PHP any higher than 7.3.x?
Good catch there
@Steve. I missed that part about the php version.
Quote from: Мel on June 24, 2022, 02:58:47 PMI can ask my hosting provider. Should it work?
Do you have cPanel? Most cPanels allow for changing of php versions. And yes, that will work.
Well it would be erroring on the return type, but I thought return types where in 7.1
Return types are in 7.0, void and nullable came in 7.1, expansions to contravariant returns in 7.4.
But what I see now I can see the source... suggests a lack of the above user having PHP 7.0 at all.
Quote from: Doug Heffernan on June 24, 2022, 05:04:44 PMDo you have cPanel? Most cPanels allow for changing of php versions. And yes, that will work.
I do, but I'm not sure how to do so.
Piece of cake. Log in to your cPanel and then scroll to the 'Software' section. Click on the 'Multi-PHP Manager' and it's pretty self-explanatory from there.
Quote from: Steve on June 27, 2022, 03:11:44 PMPiece of cake. Log in to your cPanel and then scroll to the 'Software' section. Click on the 'Multi-PHP Manager' and it's pretty self-explanatory from there.
Thanks, seems easy. It's marked as "inherited" and it looks that I can up it to any version till 7.4. If I do that, is there any chance that the forum will crash or something else would happen?) Or is it smooth sailing?
No chance that I know of so it should be smooth sailing. There's always that dreadful minuscule chance something could go wrong so back everything up first.
Yeah, everything seems fine, yet there are some mistakes like
Call to a member function versionCheck() on null
I'll try to reinstall this mod a bit later.
Thanks.
Can't use admin panel with this error :(
Any advice please?
I could not reproduce the issue with 2.0.19 and PHP 7.4
You can delete all related intergrate_* from the settings table and it will remove all hooks that power the customization. If other customizations are using the hook, you need to delete it carefully, its a comma delimited list.
Not quite got it. Maybe there is an installation manual for this mod, so I can backtrace all the changes and remove it?
I restored the backup, everything seems fine, thanks.
Perfect example of why everyone should do backups, backups, backups before installing any mod or making any other changes to your forum. :)
Hi, any help how to fix?
Captura de pantalla 2022-09-12 165334.png
Quote from: XVenomX on September 12, 2022, 03:57:27 PMHi, any help how to fix?
Captura de pantalla 2022-09-12 165334.png
It looks like the language files have not been added. Uninstall it, and then re-install it again.
Agreed. Looks like the language files did not deploy. Your languages directory (/Themes/default/languages) needs to be writable. You can check the StopForumSpam.english.php language file there.
Thanks :)
For some reason the files were not extracted and the folder was writable so I did it manually, thanks a lot.
Running SMF 2.1.2, Installed version of this mod is 1.3.
I cannot find any options to either check a member or submit a member to the SFS database? We have an API key, and in the previous version of SMF, we could do the above.
Quote from: SulevFan on October 11, 2022, 06:17:06 PMRunning SMF 2.1.2, Installed version of this mod is 1.3.
I cannot find any options to either check a member or submit a member to the SFS database? We have an API key, and in the previous version of SMF, we could do the above.
Could someone perhaps at least screenshot the user Interface of how these actions are being done in the new version? Thanks? Little bit lost here.
Hi,
I'm unable to delete SFS log file entries with v1.3 and SMF 2.0.19. After clicking the Delete button, all entries are still there and nothing has been deleted.
Did you do a hard refresh on your browser?
Quote from: SulevFan on October 12, 2022, 02:34:11 PMCould someone perhaps at least screenshot the user Interface of how these actions are being done in the new version? Thanks? Little bit lost here.
It's under the users profile (see attachment)
SPS.PNG
Oh man, and there it is, plain as the nose on my face. Thank you.
Quote from: PeakFox on October 17, 2022, 11:39:53 AMHi,
I'm unable to delete SFS log file entries with v1.3 and SMF 2.0.19. After clicking the Delete button, all entries are still there and nothing has been deleted.
There is a safety function that retains the logs for 24 hours. Anything older than 24 hours can be deleted
https://github.com/jdarwood007/smfmod_sfs/blob/63df68b38ecccc6cb432346713a8b3f434cc8911/SFS-Subs-Logs.php#L832
https://github.com/jdarwood007/smfmod_sfs/blob/63df68b38ecccc6cb432346713a8b3f434cc8911/SFS-Subs-Logs.php#L859
Quote from: SleePy on October 17, 2022, 07:04:30 PMThere is a safety function that retains the logs for 24 hours. Anything older than 24 hours can be deleted
Aha I see, thanks. Just checked again and it worked after 24h.
Hi Sleepy
I added this info to your Github page but I am posting it here also in case others are interested in this also.
On my forum, I get assaulted by known spammers every day
This morning, there were 10 attempts to register that all had two or more spam data base hits
I would like to be able to set my registration parameters to not allow registering if the IP AND Email are in the spam data base.
There's no reason I would ever allow any of these attempts to become forum members
On my web site, I send IP's that are trying to abuse PHP scripts to a 404 page.
The attempts from that IP stop after that
User name is not important to me because the Name BOB is in the spam database, but if that user name is not taken, I would allow BOB to join the forum if his IP and Email were not in the spam data base.
My registration rule would be something like this
If the IP and Email are in the spam database, send the spammer to some other page
Maybe even report them so that the username gets tagged also in case that was not in the spam data base
Look at the screen shot from this mornings registration attempts
ForumSpammers.png
And here is the next morning - Spammers trying to register
Note that all of these would have been rejected except Michaelmot
But when I looked up the IP, it was in Russia
I would have manually rejected Michaelmot
If IP and Email are in the spam data base = reject registration
ForumSpammers2.png
Are you sure you're posting in the right thread? This looks like the 2.0 version here (https://custom.simplemachines.org/index.php?mod=1547)! ;)
Hi Shades
My forum is 2.0.19
Quote from: EL34 on January 06, 2023, 01:08:39 PMHi Shades
My forum is 2.0.19
Right but this mod doesn't have the options you posted in your screenshot as far as I know. That's why I posted the other link here (https://custom.simplemachines.org/index.php?mod=1547)! 8)
What options?
Sleepy said a while back that he may look into adding some options
I am just updating info so he can see this is really needed.
I haven't had time to look into this. I've had personal things to attend to. Its tracked so I can when I get time.
Waiting for update on this version for 2.1.3
Quote from: Sudhakar Arjunan on March 13, 2023, 02:20:00 PMWaiting for update on this version for 2.1.3
Why? It works just fine on my 2.1.3 ...
Quote from: Steve on March 13, 2023, 07:29:00 PMQuote from: Sudhakar Arjunan on March 13, 2023, 02:20:00 PMWaiting for update on this version for 2.1.3
Why? It works just fine on my 2.1.3 ...
Oh you have upgraded with emulator or how did you get it worked after 2.1.3 upgrade.
I get install error after trying to install it using emulator for 2.1.3
Quote from: Sudhakar Arjunan on March 15, 2023, 04:45:12 PMI get install error after trying to install it using emulator for 2.1.3
You should not have to use Emulate to install this mod on 2.1.3!
1. What errors are you getting when you try to install?
2. What other mods do you have installed?
I've just installed Stop Forum Spam v1.4 on SMF 2.0.19. When I try to use the "Test SFS" function I get the error message "Unsupported operand types: array + null"
Hi,
Open $sources/SFS-Subs-Admin.php.php
Find:
// Parse all the responses out.
foreach ($this->context['sfs_checks'] as $key => &$res)
$res[0] += $response[$key][0];
Replace with:
// Parse all the responses out.
foreach ($this->context['sfs_checks'] as $key => &$res)
$res[0] += $response[$key][0] ?? [];
@SleePy - Is that something we should all do or is that tailored to a specific poster's problem?
You can do it. Its fixing a issue where the data is returning null rather than an array and PHP is more strict about type handling, throwing a error about merging an array and null. I have a update I was working on that I will release someday soonish that will include the fix. https://github.com/jdarwood007/smfmod_sfs/pull/16/commits/08fc46565e7bb35f3ce87c3d566a02308cfcf743
I believe that PHP 8.2+ complains, so if your on 8.1 or below, you shouldn't get the error.
There is a conflict between this mod and the Topic Participants mod. I posted about the problem here: https://www.simplemachines.org/community/index.php?msg=4159497 but found out that if I remove this mod and then add the Topic Participants one, the error I was getting goes away.
Just making you aware of it.
I'm not getting the error.
Your steps are to
1. Go to ACP > Error Log
2. Truncate Error Log
3. Navigate to Home
running smf 2.1.4 just uninstlled SFS 1.4 and tried to install 1.5.1 and it hoses the board.
during the install the screen changed to:
"This page isn't working right nowwww.brfff.com can't currently handle this request.
HTTP ERROR 500"
Help!
@SleePy, for reference regarding
@woolly bugger's post: Installing mod hosed my board? (https://www.simplemachines.org/community/index.php?topic=586931.0)
I can't reproduce that. I uninstalled the 1.4 and installed the 1.5.1 without any errors.
You can use repair_settings.php tool (on downloads page) to remove hooks. Upon removal of hooks you can uninstall the mod and reinstall it. You could also try fix_packages tool but it may not load if SMF isn't working.
Quote from: SleePy on September 11, 2023, 08:32:36 PMI can't reproduce that. I uninstalled the 1.4 and installed the 1.5.1 without any errors.
You can use repair_settings.php tool (on downloads page) to remove hooks. Upon removal of hooks you can uninstall the mod and reinstall it. You could also try fix_packages tool but it may not load if SMF isn't working.
i think it was a PHP version problem -- up graded to 8.2 but now I see that the errors I was getting may need to downgrade to 8.1?? to eliminate errors.
What errors are you getting?
PHP 8.2 just complains a bit more about type juggling. Mostly it shouldn't cause issues, just warnings. SMF has been fixing issues regarding this.
ERROR messages after install,
Hook call: function "SFS::hook_pre_profile_areas" in file /home/XXXXX/public_html/forum could not be called.
mods instslled
mods9-23.jpg
I fixed it up in 1.5.2.
typos in SFS-Admin.php :
$config_vars = $this->getConfiguraiton();
$this->saveConfiguraiton($config_vars);
have errors this mod
PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting variable (T_VARIABLE) in Sources/StopForumSpam.php on line 16
line 16:
private array $changedSettings = [];
Can you upgrade your PHP? The latest update seems to have introduced changes that break on older PHP.
Yes, the type hints are PHP 8.0. You should upgrade your php to a supported release: https://www.php.net/supported-versions.php
Also note that 8.0 is also no longer getting security fixes in one month. However some distros will backport security fixes still.
Your web hosting company just give instruction on how to update it, I just had to click on a button in my client area.
Any chance of you adding an option to disable the "logAction" part?
It's making me think there are actual forum errors, when it's just a block notice.
The logs in "SFS Logs" is more than enough for me.
Sorry, I meant "fatal_error".
An option to turn this :
fatal_error($this->txt('sfs_request_blocked'));
in to this :
fatal_error($this->txt('sfs_request_blocked'), false);
I've updated to 1.5.3 which fixes that. if you applied that change, you don't need to upgrade. Only other change was a typo correction.
Thanks!
This might be just a personal preference, but you may want to open links in a new window when clicking on the IP addresses in the SFS logs section.
I added 'target="_blank" to the links on lines 701, 702, 732, 734, 736 and it's working just fine.
Thanks again for all your hard work. This mod is working really well on my forum.
Or you just could 'ctrl + click' on the link ...
True, but that requires 2 extra steps - one to hold [CTRL] and another to click on the new tab to view it.
My method automatically brings the new tab in to view. Again, just a personal preference.
Middle click also works if you have a mouse with that (scroll wheel is sometimes middle click).
much errors have this mod:
PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting variable (T_VARIABLE) in /Sources/StopForumSpam.php on line 16
line 16:
private array $changedSettings = [];
You are using a older version of PHP. The error is related to a new feature in PHP 8.0 and higher. Ask your host to move you to a PHP 8.0 or higher release. Some hosts allow you to change this in your control panel as well.
PHP 8.2.x
SMF 2.1.4
SFS 1.5.3 (only 'Check Email? (Recommended)' is active; 'Checks Required' is at 'Email & IP Address')
This Mod generates permanently errors at the registration prozess:
Undefined array key "ip"
Backtrace information see attach.
Another special error:
SFS Failed as no data was sent:https://api.stopforumspam.org/api?json¬orexit&expire=90
Backtrace information see attach.
I think, the session was ended while the user write the post. And as he send the post, he was redirected to login, at which loosing sfs the data.
Looks like no data is being sent back. Which is odd. What is the IP address that registers the error? It must be in a invalid format for the API to reject.
With setting 'Checks Required' at 'Any [Email or Username | IP] (Default)' i get no more
Undefined array key "ip"
errors. Imho it's a mod bug.
The error
SFS Failed as no data was sent:https://api.stopforumspam.org/api?json¬orexit&expire=90
occurred for the second time today.
The error occure, if the login session has expiried before the user has send the post.
With this, if the user submit the post, he will be redirected to the login page first and has to log in again before the post was send.
During this process SFS apparently loses the data.
Give me more error details. File and line number also help.
What I'm seeing so far is the API is not responding. The undefined ip could be a lots of things. A users session timeout would not break the mod. It does not use any session data. SMF however does do session checks of its own.
For more error details look the first attachment in #106.
Quote from: SleePy on December 16, 2023, 11:52:57 AMA users session timeout would not break the mod.
Yes, it does.
The user has logged in.
While the user writes the post, the session time expires.
Then, if the user sends the post, he was redirected to the login.
At that the mod loses the variables and/or their values.
Therefore the mod sends empty variables, what triggers the error.
I have reproduce the error several times now and that's exactly what happened.
I still can't reproduce this or get this error.
Using a test account, I got to make a post, I modified the HTML code with dev tools and changed the hidden session data being passed in the form (triggers a session failed check). I got the SFS response that my post was blocked because it was found in the SFS database. I checked the SFS logs, and saw it logged the data:
Username:test
Email:[email protected]
Ip:127.0.0.1
Ip:127.0.0.1
I checked the error logs, no errors were registered. I even tested this as a guest, doing the same page manipulation on the registration page and getting the session timeout error. No errors were logged.
There are no variables maintained in the session for this. The mod will grab the IP from the $user_info['ip'] before sending it, which SMF has already set from QueryString.php logic to determine the REMOTE_ADDR. The email for a registered user is passed from $user_info['email']. Username also passes from $user_info['name']. For guests, it handles it via the submitted $_POST data. At no time is this mod using session data to handle the checks. You can see the Code (https://github.com/search?q=repo%3Ajdarwood007%2Fsmfmod_sfs%20session&type=code) and the only session checks are for the logs and handling submission to SFS. SMF 2.0 does modify the existing verification code to add in code calls for SFS, but 2.1 uses a Hook.
I'm not able to figure out where it comes from if you are seeing that.
What version of PHP do you have?
What version of SMF are you running?
What does your SFS settings page look like? You can blur out the API key, I don't need that. I need to see all the other settings, so I can configure my test environment to match and try to reproduce it.
What other mods are you running?
Look at the attached debug info, Member ist 'Guest', but Username and Email are empty, does that cause the error?
In StopForumSpam.php the code in line 255 grabs Username and Email from $_POST data. But there is no data because the user is no Guest, it's a member, and posting for guests is not allowed.
All Anti-Spam Verification options are set.
PHP 8.2.x
SMF 2.1.4
SFS 1.5.3
Do you have the setting enabled called 'Do not show the email field for guests' posts'? (ACP > Forum > Posts and Topic > Post Settings) That setting allows email to not be submitted.
Digging into the code, SMF does seem to check the verification first, so that is fun. It should be checking the basic things first before checking the verification stuff. Looks like the best option is to move the hook. Let me think about this.
In the short term, if you check IPs, the error would stop, it would only be checking IPs, but if they are not sending a username or email, it should fail anyways, just passes these checks otherwise.
The setting 'Do not show the email field for guests posts' isn't enabled.
If the User click "preview" the post, the error was logged in the SFS Log too. But in this cases ("preview"), the error was only logged in the SFS Log, not in the Forum SMF Logs.
Try this.
In StopForumSpam.php
Find:
$guestname = !isset($_POST['guestname']) ? '' : trim($_POST['guestname']);
$email = !isset($_POST['email']) ? '' : trim($_POST['email']);
Replace:
$guestname = !isset($_POST['guestname']) ? '' : trim(normalize_spaces(sanitize_chars($_POST['guestname'], 1, ' '), true, true, array('no_breaks' => true, 'replace_tabs' => true, 'collapse_hspace' => true)));
$email = !isset($_POST['email']) ? '' : trim($_POST['email']);
// SMF will take care of these if we are checking them.
if (!empty($this->modSettings['sfs_emailcheck']) && empty($modSettings['guest_post_no_email']) && empty($email))
return false;
else if (!empty($this->modSettings['sfs_usernamecheck']) && empty($guestname))
return false;
It should stop the API from being requested but depends on SMF processing its own checks to reject the submission for an empty username and empty email.
Another thing to note is these are most likely bots, as the UI has a required attribute on the email and username boxes, which should prevent the browser from accepting the post filling them in.
Hi Sleepy,
SMF has removed the ability to use wildcards in email address to ban accounts on registration in v2.1 like the follow as v2.0 used to do: *@*.*.someserver.net.
Does this mod allow you to do that? There are a lot of hackers/bots that are using this along with suspected email accounts. Am I missing something, or should I report this to Stop Forum Spam instead?
Quote from: SleePy on January 05, 2024, 07:11:28 PMTry this.
I will try this, thank you.
Quote from: SleePy on January 05, 2024, 07:11:28 PMAnother thing to note is these are most likely bots
I checked the IPs, all errors are caused by users.
Quote from: Skhilled on January 09, 2024, 08:24:17 PMHi Sleepy,
SMF has removed the ability to use wildcards in email address to ban accounts on registration in v2.1 like the follow as v2.0 used to do: *@*.*.someserver.net.
Does this mod allow you to do that? There are a lot of hackers/bots that are using this along with suspected email accounts. Am I missing something, or should I report this to Stop Forum Spam instead?
I wasn't aware of any change regarding that. It may have been accidental with changes regarding alignment to RFC if we did anything.
This mod won't change anything in regards to that, it is checking the Stop Forum Spam (https://www.stopforumspam.com/) API. So if the email is registered in that API, then it would stop it. It can optionally even ban them to stop more attempts.
If you want to ban the wildcard usage, you can add a ban for that. MySQL and PostgreSQL both use % and _ for wildcards, so you can use * safely in your ban. SMF otherwise will do a lookup for email matching.
Try banning %@%.%.someserver.net and it should work
It will not allow me to do it. I've tried on several SMF forums as well as one without any mods on it...only themes are on it. They all say, "Please enter an email address." This happens whether I use a "%, *, or _" with wildcards. And, StopForumSpam is only installed on the first site I mentioned, not any of the others. This was happening before I installed StopForumSpam. I installed it in hopes that it would help.
I'm having issues where this is triggering an error in the logs
Type of error: Undefined
2: Undefined array key "sfs_verOptionsMembers"
Seems to be happening when the user is registered and trying to send a pm
Quote from: Skhilled on January 16, 2024, 07:52:04 PMIt will not allow me to do it. I've tried on several SMF forums as well as one without any mods on it...only themes are on it. They all say, "Please enter an email address." This happens whether I use a "%, *, or _" with wildcards. And, StopForumSpam is only installed on the first site I mentioned, not any of the others. This was happening before I installed StopForumSpam. I installed it in hopes that it would help.
Use * as the wild card. *.*@gmail.com for example works.
Quote from: erich199 on January 19, 2024, 03:06:12 PMI'm having issues where this is triggering an error in the logs
Type of error: Undefined
2: Undefined array key "sfs_verOptionsMembers"
Seems to be happening when the user is registered and trying to send a pm
Do you have any options set for members?
Quote from: SleePy on January 05, 2024, 07:11:28 PMTry this.
In StopForumSpam.php
Find:
$guestname = !isset($_POST['guestname']) ? '' : trim($_POST['guestname']);
$email = !isset($_POST['email']) ? '' : trim($_POST['email']);
Replace:
$guestname = !isset($_POST['guestname']) ? '' : trim(normalize_spaces(sanitize_chars($_POST['guestname'], 1, ' '), true, true, array('no_breaks' => true, 'replace_tabs' => true, 'collapse_hspace' => true)));
$email = !isset($_POST['email']) ? '' : trim($_POST['email']);
// SMF will take care of these if we are checking them.
if (!empty($this->modSettings['sfs_emailcheck']) && empty($modSettings['guest_post_no_email']) && empty($email))
return false;
else if (!empty($this->modSettings['sfs_usernamecheck']) && empty($guestname))
return false;
It should stop the API from being requested but depends on SMF processing its own checks to reject the submission for an empty username and empty email.
Another thing to note is these are most likely bots, as the UI has a required attribute on the email and username boxes, which should prevent the browser from accepting the post filling them in.
I changed the code 2 weeks ago, until now there where no new error messages about SFS in the SMF-Logs and no Debug entries in the SFS-Logs.
I'll report again in a few weeks.
Thanks for the update. https://github.com/jdarwood007/smfmod_sfs/commit/fcfedc9dfddc37fab8583b67b6ab32772557277e
I will get it in the package officially in a few days when I have time to do some last-minute checks for other things I need to update.
HELP!
I installed this mod & it crashed my site. I can't even get into the forums to uninstall it.
I just get a "This page isn't working - HTTP ERROR 500".
The installation didn't have any errors.
SMF: 2.0.19
PHP: 7.4.22
SFS: 1.5.4
I tried restoring the backup file: https://wiki.simplemachines.org/smf/A_mod_broke_my_forum.
But it didn't help. I still get the same error: "This page isn't working - HTTP ERROR 500".
Ask your host how to upgrade to PHP 8.0.
I would also recommend upgrading to SMF 2.1 when you can, but check your mod compatibility. SMF 2.1 supports PHP 8.1 and higher.
Yes once installed on my fresh upgraded smf 2.1.4 the install page blanks out and completely cashes my Forum.
I've found ound out the the problems I were having was from Google's recaptcha and not StopForumSpam. Once I've disabled Google's recaptcha the problems went away. ;)
It may be possible that they are incompatible somehow???
Hi, I installed this mod, it works but I get a lot of errors like this:
2: Undefined array key "username"
/home/ddcrewne/public_html/forum/Sources/StopForumSpam.php (Linea 457)
Tipo di errore
Undefined_vars
Messaggio di errore
2: Undefined array key "username"
File
/home/ddcrewne/public_html/forum/Sources/StopForumSpam.php
Linea
457
URL della pagina che ha causato l'errore
https://dd-crew.net/forum/index.php?action=signup2
Informazioni di backtrace
#0: smf_error_handler()
Chiamata da /home/ddcrewne/public_html/forum/Sources/StopForumSpam.php nella linea 457
#1: sfsCheckMultiple()
Chiamata da /home/ddcrewne/public_html/forum/Sources/StopForumSpam.php nella linea 391
#2: sfsCheck()
Chiamata da /home/ddcrewne/public_html/forum/Sources/StopForumSpam.php nella linea 178
#3: checkRegisterRequest()
Chiamata da /home/ddcrewne/public_html/forum/Sources/StopForumSpam.php nella linea 146
#4: hook_register()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Subs.php nella linea 5787
#5: call_integration_hook()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Subs-Members.php nella linea 696
#6: registerMember()
Chiamata da /home/ddcrewne/public_html/forum/Sources/Register.php nella linea 531
#7: Register2()
Chiamata da /home/ddcrewne/public_html/forum/index.php nella linea 184
How can I solve it?
Thank you
@Lucarella,
Open the Sources/StopForumSpam.php
Find:
$test = call_user_func([$this, 'sfsCheck_' . $key], $response[$key], $area);
Replace:
$test = call_user_func([$this, 'sfsCheck_' . $key], $response[$key] ?? [], $area);
@Skhilled,
Are you on SMF 2.0? Recaptcha is built into 2.1. I haven't tested it with 2.0 and the Recpatcha mod installed.
No, I'm on 2.1 and was using Google's recaptcha and added their keys. When I removed it it worked better. :)
The mod can't be downloaded
An error has occurred
This package appears to have been removed from the remote host. Please contact the mod/theme author to correct.
It works just fine for me Kitty.
Very strange i tried another browser and the same result. Firefox and Chrome.
Try it now. Something was odd with GitHub and it stopped wanting to serve the file.
Quote from: SleePy on February 18, 2024, 01:39:48 PMTry it now. Something was odd with GitHub and it stopped wanting to serve the file.
Yes now it's working thanks.
I've run into an error with our forum upon trying to install the package. I'm getting the HTTP Error 500 as noted above. I looked in the error log and it's noting this as the only error for today:
[26-Mar-2024 21:58:37 Africa/Abidjan] PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /*****/**********/public_html/*********/forum/Sources/StopForumSpam.php on line 1023
I'm not sure on the Africa/Abidjan as the server is located in the Eastern U.S. I blanked out the server related info and site name info. in the above shared error log comment.
I also can't run fix_packages.php either (it doesn't seem to access it when pointed at it in a browser despite it being in the root of the forum directory with the SSI and Settings.php files) so kind of stuck at the moment. It's an old forum (not active for a # of years) that I just recently updated to 2.0.19 but I'm not sure what version of PHP and MySQL we're on as it's basically been running for awhile with minimal updates. I have ran into a lot of spammers just recently and disabled registrations.
I'd like to revert back but obviously (and quite stupidly) I didn't back things up because... why would I? *SMDH* Hoping I can just get it to uninstall but not sure if there's a means to?