glFusion / glfusion

glFusion CMS - Advanced Content Management with Style
https://www.glfusion.org
GNU General Public License v2.0
14 stars 15 forks source link

Unable to run scheduled tasks due to bad_behavior #548

Open leegarner opened 2 years ago

leegarner commented 2 years ago

There's an issue running cron tasks with Bad Behavior enabled. In functions.inc, plugin_runScheduledTask_bad_behavior2() calls bb2_expireBans(). However, that function is not available in functions.inc as it's defined in public_html/bad_behavior2/bad-behavior-glfusion.php.

If that file is included in functions.inc, there is a function name conflict over match_cidr() with the Gus plugin. Gus wraps that function call in an if (function_exists(... block, but Bad Behavior does not. If Gus is loaded first there's a conflict. The answer is probably to rename the function in Gus since that's under glFusion control, as opposed to a 3rd-party plugin. matchcidr() is the only function that I found that conflicts with Gus, almost all other functions in BB2 begin with `bb2`