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 10: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 11: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 11: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 07: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 05:11 AM

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

Kolbi 07-01-2009 11:32 AM

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

Can it is a very useful plugin.

FractalizeR 07-01-2009 11:46 AM

To slow down. There is no security hole here.

Kolbi 07-01-2009 12:04 PM

Okay, thank you.

FractalizeR 07-01-2009 12:24 PM

Welcome ;)

Kolbi 07-01-2009 12:35 PM

Am I allowed to publish the German translation?


All times are GMT. The time now is 04:47 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.01001 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete