[wp-trac] [WordPress Trac] #11819: Use mysql_real_escape_string instead of addslashes

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 18:18:30 UTC 2010


#11819: Use mysql_real_escape_string instead of addslashes
--------------------------+-------------------------------------------------
 Reporter:  hakre         |        Owner:  ryan    
     Type:  defect (bug)  |       Status:  reopened
 Priority:  high          |    Milestone:          
Component:  Security      |      Version:  2.5     
 Severity:  critical      |   Resolution:          
 Keywords:  dev-feedback  |  
--------------------------+-------------------------------------------------

Comment(by ryan):

 I'll provide more background in hopes I can point to this ticket the next
 time it comes up.

 mysql_set_charset()and its counterpart mysql_set_character_set() in MySQL
 are needed to properly set the internal encoding used by
 mysql_real_escape_string() and other functions.  SET NAMES is not
 sufficient.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11819#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list