News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Bad Behavior for SMF mod

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

Previous topic - Next topic

Kindred

right... and, as expected from the original error - the problem is not in this mod... it's with whatever mod is called "googletagged". So, your best bet it to bring it up in that mod's support thread. :)
Сл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."

Blade_Runner

Quote from: Kindred on January 22, 2013, 01:45:59 AM
right... and, as expected from the original error - the problem is not in this mod... it's with whatever mod is called "googletagged". So, your best bet it to bring it up in that mod's support thread. :)

Thank you for your reply. I will bring it up to the correct thread.

awolexpat

butchs,
I think I spoke too soon - my error had started appearing again, just that I didn't see it.  Exactly the same as before, same line too. To be on the safe side I had reuploaded the replacement file you gave me and then cleared the file cache and the Cloudflare one. The only thing I didn't do was the server cache because I don't have server caching turned on in my SMF. Does anyone have any further suggestions?
To save you looking back in the thread the error is:
Quotehttp://www.awolonline.net/forum/index.php?action=register2
8: Array to string conversion
File: /home3/awolonl1/public_html/forum/Sources/BadBehavior-mysql.php
Line: 220

and refers to this bit of code:
218: if (!strcasecmp($request_method, "POST")  && (!empty($package['request_entity']))) {
219: foreach ($package['request_entity'] as $h => $v) {
==>220: $request_entity .= $h . ": " .$v . "\n\r";
221: }


I also checked against the replacement file you gave me and this is the code on those lines. I also used a comparison program (DiffMerge) and I can see the changes you have made so I know that the revised file is the one being used.

Jerri Blank

I installed this mod and had some trouble getting it working (non-standard theme, I think), so I have uninstalled it for now.

The problem is that all the pages of my forum have this at the top:

$txt['HPlocation'] = 'Project Honey Pot (all regions)';

Can someone tell me how to get rid of that?  Wasn't the uninstall supposed to reverse changes to PHP files?

Thanks!

Kindred

try using search? This has been answered dozens of times...

What happened is that you installed a mod which added text strings to your modifications.english.php file AFTER the closing ?> in the php file.
(not this one, mind you, this one does it correctly, so some other mod did the bad thing)

All you have to do is to find the ?> in that file and move it to the very end of the file
Сл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."

Jerri Blank

Thanks for the info.

By the by, I tried searching the forum AND using a Google site search, using all or part of this stray string as my search term.  No luck either way.  I'm not a noob.

butchs

Quote from: awolexpat on January 23, 2013, 11:00:39 AM
I also checked against the replacement file you gave me and this is the code on those lines. I also used a comparison program (DiffMerge) and I can see the changes you have made so I know that the revised file is the one being used.


Since it is unlikely the key is an array the $v must be the array?  This should not happen since the core converts the array into a string.  Could be a new php version bug in the core or a new bot trick?  I have no plans to edit the core unless there is a gun to my head so try this...

Change...
$request_entity .= $h . ": " .$v . "\n\r";

To:
if (is_array($v)) break;
$request_entity .= $h . ": " .$v . "\n\r";


Then reset your claoudflare cache.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

awolexpat

It's a couple of days now and no reappearance of the error so that seems to have finally fixed it - thank you once again!

Chalky

I have searched the topic but can't find the answer.  I have BB version 1.5.11 installed and want to update to the latest version.  What's the best way to update?  Should I uninstall the previous version first then install the latest version afresh?  I'm nervous because I had to make a lot of manual edits to install this mod in the first place.

NanoSector

Try uninstalling. If you see a checkbox saying delete data associated, leave it unchecked (should keep the settings). If not, note down any settings or take a screenshot (Evernote and LightShot ftw?).
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

butchs

UPGRADING FROM AN OLDER VERSION HELP

Quote from: ChalkCat on January 27, 2013, 06:15:59 AM
I have searched the topic but can't find the answer.  I have BB version 1.5.11 installed and want to update to the latest version.  What's the best way to update?  Should I uninstall the previous version first then install the latest version afresh?  I'm nervous because I had to make a lot of manual edits to install this mod in the first place.

Quote from: Yoshi2889 on January 27, 2013, 06:54:00 AM
Try uninstalling. If you see a checkbox saying delete data associated, leave it unchecked (should keep the settings). If not, note down any settings or take a screenshot (Evernote and LightShot ftw?).

That is correct. :)

For versions  1.5.9 and older it is recommended to print the "whitelist.ini" file in the bad "Sources/bad-behavior" folder and transfer the data to the Mod's admin page.  Versions 1.5.10 and newer store the associated data for the settings in the forums database.  The ini files are no longer required.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Kindred

Unless core SMF code is further changed (and most of these updated just change the BB code in the BB specific files), what I usually do is just replace the mod specific files in the sources, sources subdirectory and the template files in the themes/default directory
Сл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."

Chalky


meylodie

Hello,

I am running SMF 2.0.4 and installed Bad Behavior a few days ago. It has prevented 11 attacks in 7 days, according to the stats. I have been browsing the admin entries related to it and while doing that I have been invited to see the latest available version on the Bad behavior main site:
http://bad-behavior.ioerror.us/2012/12/10/bad-behavior-2-2-13

Quote
Bad Behavior 2.2.13 has been released. This is a maintenance release and is recommended for all users.

QuoteChanges
The following changes have been made since 2.2.12:

    Requests from the Baidu search engine now go through screening similar to Google and other major search engines. This will help to prevent illegitimate access from clients which falsely claim to be the Baidu search engine. A logic error which prevented these checks from ever running has been fixed.

The version of the MOD has for number 1.1.15 : wouldn't it be good to get an update for it ?

Thank you,
Mélodie



butchs

If you look at the mod page.  You will find that as of  December 13, 2012 Bad Behavior for SMF mod version 1.5.15 includes Bad Behavior core version 2.2.13 plus all that wonderful stuff, and then some, I programmed to make it work on SMF.  You can verify the core version by looking at the ABOUT menu in the Bad Behavior Admin section in your forum.
:)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

meylodie

Oh yes! I feel very bad suddenly...  ???

Thank you very much for your so fast response. :)


RustyBarnacle

I have a random white bar appear at the top of my page and another user helped me notice that it usually happens when I have this at the top of my page:

removed.

Do you know why that might be?

butchs

Those are among the 20 different automatic random "Google safe" scattered honeypot spam traps.  A spam bot will click on them to get a free listing at project honeypot.

Select "Limit honeypot on forum" for less dramatic honeypots.

Oh yea, you shouldn't post the link to your honeypot spam trap.  Please edit your last post.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

RustyBarnacle

I think I've got it.  It only happens during case5

case 5:
         return '<a href="'. $modSettings['badbehavior_httpbl_link'] .'">&#020</a>';

So I replaced it with the same code that was under case 6 and I believe the problem has gone away.

This is why it was so random.

butchs

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

Advertisement: