News:

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

Main Menu

Bad Behavior for SMF mod

Started by butchs, April 12, 2010, 05:23:56 PM

Previous topic - Next topic

djkimmel

FYI - I tried removing the line feed at the end of the BadBehavior-SMF.php file and rewriting it into the mod install zip file. I installed Bad Behavior 1.5.20 on another forum with this edited file and it still ended up with the carriage return and a '+' sign at the end?? I don't know how it is doing this? I had to FTP this file after install and modify it again by removing the now present carriage return and '+' character at the end to stop my forum fonts from being magnified.

Kindred

sounds like your system may be doing something strange....
Сл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."

BillLeeDee

Quote from: djkimmel on January 18, 2018, 12:26:50 AM
Okay, I found the problem with mod Bad Behavior version 1.5.20 modified 12/31/2017. In the mod file /Sources/bad-behavior/BadBehavior-SMF.php that is called for all Bad Behavior actions, there is an errant carriage return and '+' sign at the very end of that file.

Delete the carriage return and plus sign so the file ends properly with '?>' and my fonts are no longer magnified.

Thanks for sharing, djk. I was able to compare the file from both the .19 and .20 versions and the latter has the return and plus sign you noted. Removing it does seem to solve the problem.

djkimmel

I would like to know how my system is doing this?? I install mods and software from quite a few programs and this is the first time I have ever had this happen, and only with this version 1.5.20 of the Bad Behavior mod with this one file? I am unable to see how possibly this is happening with this one file in this one mod so I don't know that there is anything I can on my end at the moment other then manually fix the file each time I install/upgrade to it on a website.

butchs

Did you read the FAQ and did you make the change to your settings?  I will make it easy for you, here is the link:  RANDOM CHARACTERS ABOVE FORUM HEADER


Try selecting "Limit honeypot on forum" for less dramatic honeypots.

::)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

butchs

Quote from: djkimmel on January 18, 2018, 01:44:53 AM
FYI - I tried removing the line feed at the end of the BadBehavior-SMF.php file and rewriting it into the mod install zip file. I installed Bad Behavior 1.5.20 on another forum with this edited file and it still ended up with the carriage return and a '+' sign at the end?? I don't know how it is doing this? I had to FTP this file after install and modify it again by removing the now present carriage return and '+' character at the end to stop my forum fonts from being magnified.

The BB Authors source does not have "?>" at the end.  I add it for compatibility purposes but honestly I think it makes no difference.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

djkimmel

Quote from: butchs on February 03, 2018, 07:45:03 AM
Did you read the FAQ and did you make the change to your settings?  I will make it easy for you, here is the link:  RANDOM CHARACTERS ABOVE FORUM HEADER


Try selecting "Limit honeypot on forum" for less dramatic honeypots.

::)

Is this directed at me? I already have that option checked. I also looked at the link and it seems we are talking about 2 completely different things...?? But then, I'm not as smart as I used to be. All I know is after I remove the + sign that looking at in code is nothing more than a + sign my fonts are no longer magnified. Hopefully, that helps other persons who are seeing this odd behavior.

djkimmel

Quote from: butchs on February 03, 2018, 07:48:09 AM
Quote from: djkimmel on January 18, 2018, 01:44:53 AM
FYI - I tried removing the line feed at the end of the BadBehavior-SMF.php file and rewriting it into the mod install zip file. I installed Bad Behavior 1.5.20 on another forum with this edited file and it still ended up with the carriage return and a '+' sign at the end?? I don't know how it is doing this? I had to FTP this file after install and modify it again by removing the now present carriage return and '+' character at the end to stop my forum fonts from being magnified.

The BB Authors source does not have "?>" at the end.  I add it for compatibility purposes but honestly I think it makes no difference.

I have no problem with the "?>" at the end. I've been told, I believe on this forum, that PHP can act up if there is a carriage return/line feed after the closing "?>" and there was in my case. Along with the + sign that is nothing more than a +sign. Your explanation appears to me to be unrelated to what I'm seeing. I know about the honeypots and I know what they look like when viewing source code of a displayed page. This is a + sign at the end of the PHP file. To me, completely different.

I do love and greatly appreciate your mod. But it doesn't change that somehow a + sign is ending up at the end of the PHP file and that + sign appears to be magnifying font size. Unrelated? Maybe, but when I edit the PHP file and remove the + sign my fonts go back to normal. To me... that seems like they might be related.

djkimmel

On a different note I'm seeing an increase in the number of undefined index User-Agent errors lately on my forums. I didn't find anything in this topic about though I thought I have read something previously on this. I checked my whitelist settings and don't have any blank or extra lines in it (seems like I read that could cause this??). Lots of Facebook IP addresses but many others involved including some bad looking characters. Error:
8: Undefined index: User-Agent
File: /home/USERNAME/public_html/forum/Sources/bad-behavior/bad-behavior/whitelist.inc.php
Line: 21

butchs

There was a carriage return on the Mac original source and a + in Windows notepad++ source.  In either event, I deleted it and updated the Mod to version 1.5.21 the4 other day.

No change was made to the core authors "whitelist.inc.php" source from 1.5.19 to 1.5.21.  That new error is most likely due to a typo in your whitelist as the format must be perfect.  Please see the help in the first post and the mods built in help icons.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

djkimmel

Okay. I keep looking at my whitelist settings. I'm probably missing something.

Thanks for finding the extra characters. Appreciate it.

dekatria

I removed the mod, yet there is still a table smf_log_badbehavior in the database.
I believe this should be removed too when deleting the mod.
How can I now remove it?

Kindred

well, it does not get deleted because the method of upgrading is uninstall the old version and install the new version.

Having the table there won't hurt anything, since it won't be used... but you can always go to phpmyadmin and drop the table.
Сл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."

landyvlad

A question about this mod?
Is this really only useful where a lot of spammers are getting through and actually posting linkspam?
I'm not getting link spam posted, maybe just two examples in two years.

I ask because I already have httpBL along with "Stop Spammer" and I wonder whether there is any advantage in adding this bad behaviour mod to my forum?

Thanks
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Kindred

no. this mod does not have any affect on linkspam, afaik.

If they are getting through your questions - then you need to revise/add questions because the ones you have are either too easy or have been cataloged
Сл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

In addition to bad behavior code this mode includes Cloudflare anti spam abilities.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Lazybones

Any chance of an update for SMF 2.1? Any one try installing it anyway?

butchs

I developed some preliminary code but the last time I messed with the Beta's and RC's I had to re-write it all the time.  Every time there was an update it impacted my entry point.  When 2.1 is released I will update for sure.  Maybe RC 2.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Lazybones

Quote from: butchs on November 02, 2019, 07:16:34 AM
I developed some preliminary code but the last time I messed with the Beta's and RC's I had to re-write it all the time.  Every time there was an update it impacted my entry point.  When 2.1 is released I will update for sure.  Maybe RC 2.

We had to move hosting and decided to take the opportunity to jump to 2.1 RC2 since it was released at the end of March. I completely understand not wanting to code against substantial changes. Sadly it only took a few days for spammers to start registering even with reCAPTCHA enabled.

butchs

Understood. I am bogged down with a Cisco firewall that was replaced with a RMA.  Nothing is easy there... as they sent the wrong stuff again.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Advertisement: