News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Stop Spammer

Started by M-DVD, December 31, 2008, 07:31:43 AM

Previous topic - Next topic

djkimmel

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.

Arantor

The mod author hasn't been here in 7 years.

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

butchs

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.

kitz

Quote from: Arantor on November 22, 2017, 02:11:04 PM
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?

QuoteI 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.

pwhodges

#1985
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

zerofossilfuel

#1986
Quote from: pwhodges on November 24, 2017, 06:28:24 PM
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

Arantor

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.

ceekay27

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  :'(

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ceekay27

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?


davidhs

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

Kindred

If there are no errors, it will install just fine on 2.0.15 by using the version emulate feature
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lurkalot

Quote from: davidhs 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

Quote from: Kindred 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

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.  ;)


Illori

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.

lurkalot

Quote from: Illori 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.

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?

Illori

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.

davidhs

Quote from: lurkalot on November 29, 2017, 03:52:38 AM
Quote from: davidhs 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

Quote from: Kindred 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

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. ;)

Quote from: Illori 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.
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? ???

Quote from: Illori 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.
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.

Arantor

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.

davidhs

Quote from: Arantor on November 30, 2017, 08:36:16 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.

Advertisement: