Advertisement:

Author Topic: Stop Spammer  (Read 743754 times)

Offline djkimmel

  • Semi-Newbie
  • *
  • Posts: 68
    • GreatLakesBass.com
Re: Stop Spammer
« Reply #1980 on: November 22, 2017, 01:44:14 PM »
Hopefully, the mod author will clarify and/or fix soon.

Here's what I did for now hoping that it works correctly for both the mod and the new version of SMF 2.0.15 changes.

Uninstall Stop Spammer first. Then I updated to SMF 2.0.15.

Then I reinstalled Stop Spammer even though the one ManageMembers.php file error was noted.

Then I edited the updated ManageMembers.php manually for the final change as suggested by lesmond and Russell G.

Code: (find) [Select]
if ($context['sub_action'] == 'query' && empty($_POST))
Code: (replace) [Select]
if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))
This version seems to match what the Stop Spammer edit would be if you just remove the "&& !empty($_REQUEST['params'])" part that is the difference between the original Stop Spammer and SMF 2.0.14 version.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,594
    • StoryBB/StoryBB on GitHub
Re: Stop Spammer
« Reply #1981 on: November 22, 2017, 02:11:04 PM »
The mod author hasn't been here in 7 years.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,337
  • Gender: Male
    • Kindred-999 on GitHub
Re: Stop Spammer
« Reply #1982 on: November 22, 2017, 08:03:18 PM »
I did the opposite...  I just edited the line for 2.0.15 around the mod edit that was already there...

Either way works and keeps both the system and the mod working just fine
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,725
  • Lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: Stop Spammer
« Reply #1983 on: November 23, 2017, 08:37:14 AM »
Me too.  I did something like this in the install2 xml:
      <operation>
         <search position="replace"><![CDATA[if ($context['sub_action'] == 'query' && empty($_POST))
   {
      if (!empty($_REQUEST['params']))
      {
         $_POST += safe_unserialize(base64_decode($_REQUEST['params']));
      }
      elseif ($context['browser']['is_ie'] && !empty($_SESSION['params']))
      {
         $_POST += $_SESSION['params'];
         unset($_SESSION['params']);
      }
   }]]></search>
         <add><![CDATA[if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))
   {
      if (!empty($_REQUEST['params']))
      {
         $_POST += safe_unserialize(base64_decode($_REQUEST['params']));
      }
      elseif ($context['browser']['is_ie'] && !empty($_SESSION['params']))
      {
         $_POST += $_SESSION['params'];
         unset($_SESSION['params']);
      }
   }]]></add>
      </operation>

I am testing now and hope it works...
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Offline kitz

  • Jr. Member
  • **
  • Posts: 120
    • kitz.co.uk
Re: Stop Spammer
« Reply #1984 on: November 23, 2017, 11:58:17 AM »
The mod author hasn't been here in 7 years.

Correct me if Im wrong, but I thought Snoppy had kindly taken StopSpammer under his wing?

Quote
I am testing now and hope it works...

Thanks guys for your hard work in trying to find work arounds but I still have some doubts about how the impact of manually amending ManageMembers.php will affect future updates to SMF.   

- Is it the end of being able to easily install any future SMF security updates.
- What is the effect of manually editing going to have on being unable to install StopSpammer if needed next time a similar issue occurs.

My doubts are based around having to literally start again from scratch when upgrading from SMF1 to SMF2.   My forum has been around in excess of 10years and it got to the stage where all the manual edits totally took away the ability to hardly automate anything.   I swore after that, that I'd never touch any of the core code and only stick to a very few mods.

I think a few of us are still waiting and hoping that a proper solution can be found.

Offline pwhodges

  • Newbie
  • *
  • Posts: 7
Re: Stop Spammer
« Reply #1985 on: November 24, 2017, 06:28:24 PM »
I just made a new copy of "url removed" which includes "install2015.xml" with the necessary modification, and a changed package-info.xml to use it if the version is this one or later.  So it will still install and uninstall on any version - though it will need to be uninstalled when updating or reverting across this forum version change.

Url removed due to unauthorized distribution - Steve
« Last Edit: November 25, 2017, 10:16:52 AM by Steve »

Offline zerofossilfuel

  • Semi-Newbie
  • *
  • Posts: 18
Re: Stop Spammer
« Reply #1986 on: November 25, 2017, 09:10:27 AM »
I just made a new copy of [link removed] which includes "install2015.xml" with the necessary modification, and a changed package-info.xml to use it if the version is this one or later.  So it will still install and uninstall on any version - though it will need to be uninstalled when updating or reverting across this forum version change.

THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU, THANK YOU!!!!!!!!

Edit by Gary: Removed quoted link
« Last Edit: November 25, 2017, 10:14:37 AM by Gary »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,594
    • StoryBB/StoryBB on GitHub
Re: Stop Spammer
« Reply #1987 on: November 25, 2017, 10:13:25 AM »
Unfortunately I have to ask the team to remove the link to the mod - because the mod is not licensed to allow people to make modified versions.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ceekay27

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Female
Re: Stop Spammer
« Reply #1988 on: November 26, 2017, 02:59:47 PM »
I think that would have made it so much easier for me. I'm lost, never had to edit code before....
if im in the files in my cpanel, can I just replace the code in there? Or do I have to edit it on my pc and then upload it? Totally lost  :'(

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,337
  • Gender: Male
    • Kindred-999 on GitHub
Re: Stop Spammer
« Reply #1989 on: November 26, 2017, 07:32:33 PM »
As long as you take a backup first, you can do either one.

I usually use the Cpanel file manager for quick edits and do the download/upload thing for more major edits
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline ceekay27

  • Semi-Newbie
  • *
  • Posts: 49
  • Gender: Female
Re: Stop Spammer
« Reply #1990 on: November 27, 2017, 03:46:54 AM »
Thanks for the reply.... I have uninstalled stop spammer and there are no errors now. So I just need to update, then re-install, then replace that section of code? Would that be correct?


Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Stop Spammer
« Reply #1991 on: November 28, 2017, 09:18:01 AM »
Stop Spammer not install on SMF 2.0.15 but... according manual instructions there are no errors :o
https://custom.simplemachines.org/mods/index.php?action=parse&mod=1547&smf_version=2.0.15&attach=165955

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,337
  • Gender: Male
    • Kindred-999 on GitHub
Re: Stop Spammer
« Reply #1992 on: November 28, 2017, 08:36:14 PM »
If there are no errors, it will install just fine on 2.0.15 by using the version emulate feature
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline lurkalot

  • Sophist Member
  • *****
  • Posts: 1,159
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Stop Spammer
« Reply #1993 on: November 29, 2017, 03:52:38 AM »
Stop Spammer not install on SMF 2.0.15 but... according manual instructions there are no errors :o
https://custom.simplemachines.org/mods/index.php?action=parse&mod=1547&smf_version=2.0.15&attach=165955

If there are no errors, it will install just fine on 2.0.15 by using the version emulate feature

Not sure, but I think what davidhs is saying is the package parser is giving out the wrong info.  The mod will fail but the parser says it won't.  Correct me if I'm wrong though.  ;)


Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,084
Re: Stop Spammer
« Reply #1994 on: November 29, 2017, 10:56:25 AM »
the mod parser just tells you what the edits are, it does not compare then against anything. so if SMF changes something the mod parser has no idea, it just spits out to you what the mod author wants you to do.

Offline lurkalot

  • Sophist Member
  • *****
  • Posts: 1,159
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: Stop Spammer
« Reply #1995 on: November 29, 2017, 01:33:16 PM »
the mod parser just tells you what the edits are, it does not compare then against anything. so if SMF changes something the mod parser has no idea, it just spits out to you what the mod author wants you to do.

Ok, I didn't realise it worked like that.  So what's the point of the SMF version dropdown? Also shouldn't it therefore alert us that the mod isn't compatible with this current version?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,084
Re: Stop Spammer
« Reply #1996 on: November 29, 2017, 01:45:00 PM »
some mods have different installers for different versions so you can see it for that version. this author has it set to install on all versions.

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Stop Spammer
« Reply #1997 on: November 30, 2017, 08:26:04 AM »
Stop Spammer not install on SMF 2.0.15 but... according manual instructions there are no errors :o
https://custom.simplemachines.org/mods/index.php?action=parse&mod=1547&smf_version=2.0.15&attach=165955

If there are no errors, it will install just fine on 2.0.15 by using the version emulate feature

Not sure, but I think what davidhs is saying is the package parser is giving out the wrong info.  The mod will fail but the parser says it won't.  Correct me if I'm wrong though.  ;)
Yes, I said: Stop Spammer can not install on 2.0.15, but parser say "all ok with 2.0.15" THEN there are an error in parser. ;)

the mod parser just tells you what the edits are, it does not compare then against anything. so if SMF changes something the mod parser has no idea, it just spits out to you what the mod author wants you to do.
I did not a test but... if I can select mod and SMF versions and then to do parser with those versions, I suppose parser use mod and SMF versions. What else? ???

some mods have different installers for different versions so you can see it for that version. this author has it set to install on all versions.
Yes, the author suppose her mod works with next SMF versions (I do same with my MOD) but if new SMF version change some important code for the mod (like this case), the mod really do not work. And parser must say: "It do not work".
In this case the author should update his mod.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,594
    • StoryBB/StoryBB on GitHub
Re: Stop Spammer
« Reply #1998 on: November 30, 2017, 08:36:16 AM »
Except that isn't what the parser does. It says "based on the mod code, these are the steps you should attempt to do for 2.0.15" because that's all the mod itself says to do.

Rewriting the parser to attempt installation in the fashion you're suggesting is a bad idea, because then people will say "the parser said it should install but it didn't" because another mod prevented it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 996
  • Gender: Male
Re: Stop Spammer
« Reply #1999 on: November 30, 2017, 09:12:36 AM »
Rewriting the parser to attempt installation in the fashion you're suggesting is a bad idea, because then people will say "the parser said it should install but it didn't" because another mod prevented it.
Ok, I understand this.