Make WordPress Core

Opened 18 months ago

Last modified 8 months ago

#43571 reviewing defect (bug)

`add_feed` with regex characters breaks rewrite rules

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


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 18 months ago.

Download all attachments as: .zip

Change History (5)

18 months ago

#1 @mukesh27
18 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
17 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @pento
11 months ago

  • Milestone changed from 5.0 to 5.1

#4 @pento
8 months ago

  • Keywords needs-unit-tests added
  • Milestone changed from 5.1 to Future Release

Patch needs unit tests and reviewing.

Note: See TracTickets for help on using tickets.