[wp-trac] [WordPress Trac] #19455: The "magic_quotes_sybase" Problem

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 22 19:28:21 UTC 2011


#19455: The "magic_quotes_sybase" Problem
--------------------------+------------------------------
 Reporter:  summerblue    |       Owner:  夏天
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.2.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by kurtpayne):

 * cc: kpayne@… (added)


Comment:

 I can reproduce this.  Here's what's happening:

 1. `$_POST` comes in with sybase quotes (e.g. `Charlie''s little cat`)
 1. magic_quotes_sybase is disabled
 1. stripslashes() is run on `$_POST` which respects sybase quotes
 settings.
   a. With sybase quotes disabled (current behavior), stripslashes is
 looking for `\'` instead of `''` and this is not converted correctly.
   a. With sybase quotes still enabled (@summerblue's solution),
 stripslashes is looking for `''`, and the input is converted properly
 (e.g. `Charlie''s -> Charlie's`), ''then'' magic_quotes_sybase is disabled

 I tested this solution on all possible combinations of magic_quotes_gpc,
 magic_quotes_runtime, and magic_quotes_sybase with no problems.

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


More information about the wp-trac mailing list