News:

Wondering if this will always be free?  See why free is better.

Main Menu

BotBanish Firewall Client

Started by Randem, November 17, 2017, 11:30:02 AM

Previous topic - Next topic

Randem

#260
Aloha Shades,

What version of PHP and Apache are you running on?
Can you send a copy of the offending files or a few of the lines around the error. We test on a clean system with only a few MOD's installed, those lines contain nothing much on our system. Possibly we interfered with an installed MOD. Are there any error files such as error_log in the root or SMF folder and in the BotBanish/bot/Client/BotBanish_log folder?

Also the function LogTopicViews() is not a BotBanish or SMF function. BotBanish may be interfering with another MOD.

Subs.php line 5821 - 5823

        $smcFunc['db_free_result']($request);

        if (!empty($current_functions))

Load.php lines 2678 - 2681


    $loaded = false;
    foreach ($settings['template_dirs'] as $template_dir)
    {

index.php line 242 - 243

    if (!empty($topic) && empty($board_info['cur_topic_approved']) && !allowedTo('approve_posts') && ($user_info['id'] != $board_info['cur_topic_starter'] || $user_info['is_guest']))
        fatal_lang_error('not_a_topic', false);
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Shades.

Quote from: Randem on October 10, 2022, 12:16:08 PMAloha Shades,

What version of PHP and Apache are you running on?
Can you send a copy of the offending files or a few of the lines around the error. We test on a clean system with only a few MOD's installed, those lines contain nothing much on our system. Possibly we interfered with an installed MOD. Are there any error files such as error_log in the root or SMF folder and in the BotBanish/bot/Client/BotBanish_log folder?

Also the function LogTopicViews() is not a BotBanish or SMF function. BotBanish may be interfering with another MOD.

Subs.php line 5821 - 5823
Oops sorry I already uninstalled it but if I reinstall it and get the error again I'll post back!

Thanks,
Shades 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Randem

BotBanish v4.0.05 is PHP 8.1.x and SMF 2.1.2 ready
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Marina3

Will this mod work on Nginx server?

Randem

BotBanish is designed for use on PHP, mySQL & Apache ONLY. It has not been tested on Nginx.
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

BotBanish will not work on NGINX yet, due to BotBanish's use of the .htaccess file which NGINX will not allow. We are working on this and will keep updated.
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

Tested BotBanish on NGINX with proxy caching and it will work as designed. Have not tested on stand-alone NGINX that does not allow .htaccess access as of yes. Will need to change BotBanish's .htaccess processing for this to work.
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

arminus

Trying to test this on
  • SMF 2.1.3
  • Apache/2.4.56 (Debian)
  • PHP 7.4

the generated .htaccess results in a broken site and this error in the apache error log:

/home/www/mysites/.htaccess: Invalid command 's.org/', perhaps misspelled or defined by a module not included in the server configuration, referer: https://mysites.domain.org/index.php?action=admin;area=packages;sa=install2;package=BotBanish_Client_SMF_v4.0.07.zip;pid=0
Unfortunately without reporting the line number.

The following apache mods are enabled:

access_compat.load  authz_core.load  cgid.load     filter.load   mpm_prefork.conf  proxy.conf       setenvif.conf       status.load
alias.conf          authz_host.load  deflate.conf  headers.load  mpm_prefork.load  proxy_http.load  setenvif.load
alias.load          authz_user.load  deflate.load  jk.conf       negotiation.conf  proxy.load       socache_shmcb.load
auth_basic.load     autoindex.conf   dir.conf      jk.load       negotiation.load  reqtimeout.conf  ssl.conf
authn_core.load     autoindex.load   dir.load      mime.conf     php7.4.conf       reqtimeout.load  ssl.load
authn_file.load     cgid.conf        env.load      mime.load     php7.4.load       rewrite.load     status.conf

I'll attach the generated .htaccess (with the actual domain name anonymized)

Randem

Hi arminus, I Will need to see the .htaccess file to see what is broken. The issue could be anything from invalid format to a depreciated call. Send me the .htaccess file so that I can take a look. BotBanish definitely does not have any commands like s.org
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Arantor

Um, he literally attached it to his post?

Randem

Thanks, I did not get that in the email that SMF sent...
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

#271
This is where your issue is
s.org/ [L,R=301]
RewriteRule ^yabb/(.*)$ https:///www.roberge.de/$1 [R=301]

BotBanish did not place this into the .htaccess file. All the information BotBanish places into your .htaccess file is between code verification points like

# * * * * * BotBanish BOT Start (REWRITECOND) * * * * *
# * * * * * BotBanish BOT End (REWRITECOND) * * * * *

# ***** BotBanish RULES Start *****
# ***** BotBanish RULES End *****

# ***** BotBanish CODE Start *****
# ***** BotBanish CODE End *****


Anything outside of those code marks were place there by some other method. Also you have Apache 2.2 code in the file that should be changed to the 2.4 version. Not an issue yet but one day in the future. BotBanish will use the 2.4 version of the commands unless of course your on 2.2.

# DO NOT REMOVE OR CHANGE!!!
# Everything between the BotBanish Start and End markers will be removed when the BotBanish is uninstalled


BotBanish makes a backup of the .htaccess file before any changes are made. Check your root folder for the backup files. The files have a numeric value appended to the name. Perhaps you can post that file and I can take a look.
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

arminus

You are right and I could have spotted this - however, this is IMHO caused by a "bad patch" of the .htaccess file by the BotBanish installer. See the attached diff, left is original, right is after the installation. I blurred out parts of the URLs, they are of course valid URLs.

The original sequence looks like this:

#RewriteCond %{HTTP_USER_AGENT} ^Slurp
#RewriteRule ^ https://www.domain.de/ [L,R=301]
RewriteRule ^yabb/(.*)$ https:///www.domain.de/$1 [R=301]

This is what threw me off, the site, even if copied to a test server worked fine before having installed BotBanish. But since that line was commented out in the original anyway, and I didn't add it myself and don't know why it is there in the first place, I'm fine.


Randem

Great! If you would, I would like a copy of your .htaccess file before installation to test with. It makes no sense on how that line got split up (never seen that before). I want to see if the format of the file has something to do with it or if I can reproduce the effect. Also those lines do not has s.org in them, curious...
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

arminus

Here you go. I kind of inherited maintenance for that site, so I can't really tell you what the intent of these lines was originally.

Randem

Thanks, I will let you know what I find and make any corrections if I do find something strange...
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

arminus

Thanks for the quick responses!

There a couple of more issues I noticed:
  • Timezone seems to be hardcoded to Honolulu (or -12h from my time zone)
  • (related to that?): Switching the language to German, I get PHP errors in showanalytics
Undefined index: Time in ..../BotBanish/bot/Analytics/BotBanishAnalytics.php on line 583
Undefined index: Days in ..../BotBanish/bot/Analytics/BotBanishAnalytics.php on line 588
  • Adding an IP and a name to the blacklist, the name is not saved (i.e. doesn't appear in the table of blacklisted IPs)

Also, a more general question: This mod heavily modifies SMF code - what happens if I upgrade SMF to > 2.1.3 down the road?

Randem

I will take a look at this. I fixed the error with the .htaccess file (Thanks for sharing). It was a problem with comments. I will check on the errors you posted and let you know when BotBanish 4.0.08 will be release with the fixes. I just added an IP to the blacklist and it does appear in the BotBanish list not in an SMF table. Are you looking in an SMF table? The timezone should be the same as SMF, I will double check this.

We will be releasing BotBanish 4.1.00 soon which will be for SMF 2.1.3, so that will not be an issue. You would just uninstall BotBanish 4.0.07 without deleting the data tables then install BotBanish 4.1.00 on SMF 2.1.3 and you will be fine.

Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

Attached are updated language files that you can replace the ones you have. We have implemented a better system in updating our language files. Sometimes some things would get left out in the manual conversion. The conversions are now mostly automatic now to keep the language files up to date.

BotBanish language files are in the SMF folder Themes/default/languages/BotBanish
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Randem

The timezone is static but can be changed in the database table botbanishclient_settings via the name column with the value of BOTBANISH_TIMEZONE. This is an over-site and will allow timezone change in the next version. We allow it to be changed on the website install but forgot on the SMF version.
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Advertisement: