WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 9 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:
PR Number:

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

Download all attachments as: .zip

Change History (5)

@soulseekah
19 months ago

#1 @mukesh27
19 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
19 months ago

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

#3 @pento
13 months ago

  • Milestone changed from 5.0 to 5.1

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