[wp-trac] [WordPress Trac] #24941: esc_sql in 3.6 changes how /r /n and maybe other characters handled

WordPress Trac noreply at wordpress.org
Sat Aug 3 14:04:35 UTC 2013


#24941: esc_sql in 3.6 changes how /r /n and maybe other characters handled
--------------------------+------------------------------
 Reporter:  sc0ttkclark   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  3.6
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by sc0ttkclark):

 @nofearinc This was comparing WP 3.x to 3.6 -- 3.6 is _doing_it_right but
 3.x had been using addslashes all along:

 3.x: esc_sql >> WPDB::escape >> WPDB::_weak_escape >> addslashes

 3.6: esc_sql >> WPDB::_escape >> WPDB::_real_escape >>
 mysql_real_escape_string (if db connection active), addslashes (plus
 _doing_it_wrong if no connection)

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


More information about the wp-trac mailing list