View Single Post
  #141  
Old 04-08-2009, 04:54 AM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Smart Search from alteredCart :: Spell Checking, Did You Mean? and More.

Quote:
Originally Posted by Manic
I have Smart Search installed. I just noticed when searching for a word with the letters "char" (such as "charles" or "character"), it displays a message "invalid search" on a white background and my entire store disappears?

This was added when the were a lot of attacks using CHAR keyword attempting to hack X-Cart. X-Cart versions 4.x and higher are not vulnerable to this attach.

To change this open _search.php and find this about line 100:

PHP Code:
// Kill search when certain characters are used //
        
foreach (array(";","@","http","script",".php",".txt",".html",".htm","exec","char") as $kill)    
            if (
stristr($searchstring$kill))
                die(
'Invalid Search'); 

You can remove the entire block of code, or just the "exec" and "char" at the end.

This code is no longer in the Smart Search for version 2.0 and on.
Reply With Quote