WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#24130 closed defect (bug) (duplicate)

Remove wp_magic_quotes()

Reported by: thanatica2 Owned by:
Milestone: Priority: normal
Severity: major Version: 3.5.1
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

wp_magic_quotes has no right to exist. Not anymore, anyway.

Magic quotes has been removed from PHP for good reason, and wordpress appears to be adding magic quotes even for custom non-wordpress code. I have been pulling my hair out trying to figure out where the hell those magic quotes where coming from. And now I see no way of preventing wordpress from adding magic quotes, other than removing whatever wordpress is adding. Such a waste.

It also creates a $_REQUEST variable, which is also in PHP by default. No need to re-add it. It may well be slightly different from PHP's default one, which would make it even worse, because custom code may depend on it.

At the VERY least, only add magic quotes for wordpress-related code and/or make the standard get_magic_quotes_gpc() somehow return true if you absolutely must magicquote every byte coming in.

Change History (2)

#1 @johnbillion
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #18322.

See also #22325

#2 @SergeyBiryukov
7 years ago

It also creates a $_REQUEST variable, which is also in PHP by default. No need to re-add it. It may well be slightly different from PHP's default one, which would make it even worse, because custom code may depend on it.

There's actually a reason for overriding $_REQUEST. See ticket:22325:36 and the original discussion in #8814.

Note: See TracTickets for help on using tickets.