Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#43571 reviewing defect (bug)

`add_feed` with regex characters breaks rewrite rules

Reported by: soulseekah Owned by: SergeyBiryukov
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords: has-patch
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 3 months ago.

Download all attachments as: .zip

Change History (3)

3 months ago

#1 @mukesh27
3 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.