Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#43571 reviewing defect (bug)

`add_feed` with regex characters breaks rewrite rules

Reported by: soulseekah's profile soulseekah Owned by: sergeybiryukov's profile 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 6 years ago.

Download all attachments as: .zip

Change History (5)

6 years ago

#1 @mukesh27
6 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
6 years ago

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

#3 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

#4 @pento
5 years 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.