vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Board Optimization - FractalizeR: Search limits (https://vborg.vbsupport.ru/showthread.php?t=217489)

FractalizeR 06-29-2009 09:00 PM

FractalizeR: Search limits
 
1 Attachment(s)
Introduction
Some time ago I received several messages from my server about database error. They are described here. It looked like malicious server overload or hack attempt. It seemed to me like some hacker found the way to flood my server with expensive queries. Some time after I found the reason.

This is not an engine bug, at least it doesn't look like one. But until devs will make a decision (I guess they are too busy with VB4), I wanted my forum to be protected. So, I made this addon. It should be compatible with vb 3.6.x, 3.7.x and 3.8.x

Engine specifics
As far as I can understand, on search, Vbulletin makes at least two additional queries for each word you searched for (one per word table, second - for post table to find posts for that word). If some words ORed - results joined. If they are ANDed - an intersection is calculated in PHP via array_intersect. Those queries are without any LIMIT clause and can make a load on server. Actually, that is why search is so resource-intensive.

What does it do?
It limits the amount of search operators and overall search query word count to prevent high server load.

Hack is disabled after installation and you need to setup limits in Vbulletin options after installation.

How to install/upgrade?
Just import/reimport product xml.

What are the recommended settings for big boards?
I think, you can limit overal operators to 4 and a number of search words to 7-10. I don't think regular users will push the limits.

Version history:
1.0
Initial release

Kolbi 06-30-2009 10:05 AM

I don“t clearly understand you plugin.

I mean, which user uses OR or NOT ?

But the maximum of words in search querys is a good thing.

FractalizeR 06-30-2009 10:25 AM

When you enter search query, you may type the following:
HTML Code:

"Vbulletin OR forum -IPB"
Which means to search for posts containing word "Vbulletin" OR word "forum" AND NOT word "IPB".

Kolbi 06-30-2009 06:34 PM

:) Thank you.

Do you think many user use this? Or do you think the search engines are causing this problem?

FractalizeR 07-01-2009 04:11 AM

No. I don't think regular users use this at all. Search is abused only with intention.

Kolbi 07-01-2009 10:32 AM

You mean to attack a site? Or to slow down?

Can it is a very useful plugin.

FractalizeR 07-01-2009 10:46 AM

To slow down. There is no security hole here.

Kolbi 07-01-2009 11:04 AM

Okay, thank you.

FractalizeR 07-01-2009 11:24 AM

Welcome ;)

Kolbi 07-01-2009 11:35 AM

Am I allowed to publish the German translation?

FractalizeR 07-01-2009 12:04 PM

Of course ;) Attach it and I will reattach it to first post. Of course you will be credited.

cad2go 07-12-2009 01:13 PM

Thanks Fractalizer

FractalizeR 07-12-2009 05:34 PM

You are welcome ;)

xorex 10-02-2011 05:32 AM

"Global maximum for search operators" not working for me

I set it to 5 and try search

Quote:

test OR test2 OR test3 OR worlds OR test234 NOT testing NOT verify NOT apple
results:

Quote:

test OR test2 OR test3 OR worlds OR test234, -testing, -verify, -apple
Maximum number of OR operators allowed - 4

Maximum number of NOT operators allowed - 4

Or "Global maximum for search operators" should be equal to or more both settings above ?

webmastersitesi 01-23-2012 07:31 PM

Very clever and lovely plugin. I thank you so much for this.


All times are GMT. The time now is 02:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03415 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete