Make WordPress Core

Opened 8 years ago

Last modified 2 months ago

#43571 reviewing defect (bug)

`add_feed` with regex characters breaks rewrite rules

Reported by: soulseekah Owned by: SergeyBiryukov
Priority: normal Milestone: Future Release
Component: Rewrite Rules Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

add_rule( 'test.json', ... ) does not get escaped with preg_quote. Fine for this example, but something like add_rule( 'test[json]', ... ) will definitely yield unexpected results. Something like add_rule( 'test???', ... ) will break the whole feed (maybe even more) regular expression.

Attachments (1)

43571.diff (973 bytes ) - added by soulseekah 8 years ago.

Download all attachments as: .zip

Change History (6)

@soulseekah
8 years ago

#1 @mukesh27
8 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
8 years ago

  • Milestone Awaiting Review5.0
  • Owner set to SergeyBiryukov
  • Status newreviewing

#3 @pento
8 years ago

  • Milestone 5.05.1

#4 @pento
8 years ago

  • Keywords needs-unit-tests added
  • Milestone 5.1Future Release

Patch needs unit tests and reviewing.

This ticket was mentioned in PR #12473 on WordPress/wordpress-develop by @sainathpoojary.


2 months ago
#5

  • Keywords has-unit-tests added; needs-unit-tests removed

Trac ticket: #43571

Note: See TracTickets for help on using tickets.