[wp-trac] [WordPress Trac] #43571: `add_feed` with regex characters breaks rewrite rules

WordPress Trac noreply at wordpress.org
Sun Mar 18 17:44:22 UTC 2018


#43571: `add_feed` with regex characters breaks rewrite rules
---------------------------+-----------------------------
 Reporter:  soulseekah     |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 `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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43571>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list