[wp-trac] Re: [WordPress Trac] #3722: DB error when sanitized search string results in empty query

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 31 02:46:40 GMT 2007


#3722: DB error when sanitized search string results in empty query
-------------------------------------------------+--------------------------
 Reporter:  zippity                              |        Owner:  charleshooper
     Type:  defect                               |       Status:  assigned     
 Priority:  normal                               |    Milestone:  2.1.1        
Component:  General                              |      Version:  2.1          
 Severity:  normal                               |   Resolution:               
 Keywords:  has-patch needs-testing 2nd-opinion  |  
-------------------------------------------------+--------------------------
Changes (by charleshooper):

  * component:  Security => General
  * summary:  Search string does not sanitize commas => DB error when
              sanitized search string results in empty query

Comment:

 I guess it's also worth mentioning that commas _are_ being sanitized. The
 reason for the error is that once the commas are gone WordPress attempts
 to wrap the search query with "{{{AND ( $search )}}}"

 Since {{{$search}}} is null MySQL throws up an error.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3722#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list