[wp-trac] [WordPress Trac] #38187: Regex special chars should be escaped in WP_oEmbed

WordPress Trac noreply at wordpress.org
Thu Sep 29 16:24:45 UTC 2016


#38187: Regex special chars should be escaped in WP_oEmbed
--------------------------+-----------------------------
 Reporter:  jrf           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Embeds        |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Just noticed four oembed regexes which each contained a non-escaped dot
 which potentially could result in incorrect matches (not very likely).

 `.` in a regex means "match anything", it needs to be escaped `\.` to be
 interpreted as a literal period character.

 So, for example, `http://daiwly/` would match when it shouldn't. Though as
 I said, very unlikely as that would not make for a valid url.

 These are probably artifacts from when each of these were transformed from
 a non-regex key into a regex based key.

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


More information about the wp-trac mailing list