Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#20322 closed defect (bug) (fixed)

viddler embed not working

Reported by: arena Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.4
Component: Embeds Keywords: has-patch
Focuses: Cc:


when having this in a post :


should display the video !

but nothing appears

Attachments (2)

wp-oembed-data2html-sanitition.diff (1.9 KB) - added by nacin 6 years ago.
Patch from mdawaffe.
20322.diff (1.7 KB) - added by nacin 6 years ago.
Smooth the edges of the initial patch. Always use the filter.

Download all attachments as: .zip

Change History (12)

#1 @Ipstenu
6 years ago

Doesn't work on my 3.3 install, but it works on my wordpress.com blog.

I get this error on 3.3

Warning: strpos() expects parameter 1 to be string, object given in /home/foobar/public_html/wp-includes/class-oembed.php on line 268

Catchable fatal error: Object of class stdClass could not be converted to string in /home/foobar/public_html/wp-includes/class-oembed.php on line 269

If I use [viddler id=8918af90]

I get [ERROR: An invalid Viddler shortcode format was used. Please check your code.]

I can reproduce it with Viddler's sample video: http://www.viddler.com/explore/cdevroe/videos/424/ (just to make sure it wasn't the vid itself)

ETA - If the video is the last line of content, it's a blank page on 3.4 - If there's there's anything below it, it shows the video URL.

Last edited 6 years ago by Ipstenu (previous) (diff)

#2 @helenyhou
6 years ago

Contrary to their docs, Viddler seems to actually return an object for the html value now, which is not in line with the oEmbed spec. Example

#3 @nacin
6 years ago

We've been discussing this internally on the security team list and had planned to make it public. Someone reached out to Viddler but apparently they have not acted on this.

Let's add some poka-yoke here to ensure we are always dealing with a scalar value. And then get Viddler to fix their broken endpoint.

Last edited 6 years ago by nacin (previous) (diff)

6 years ago

Patch from mdawaffe.

#4 @nacin
6 years ago

  • Keywords has-patch added

#5 @nacin
6 years ago

  • Milestone changed from Awaiting Review to Future Release

#6 @nacin
6 years ago

  • Milestone changed from Future Release to 3.4

6 years ago

Smooth the edges of the initial patch. Always use the filter.

#9 @nacin
6 years ago

  • Severity changed from major to normal

#10 @nacin
6 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20539]:

Add sanity checks to WP_oEmbed::data2html() to ensure we are working with scalar values. Always use the filter. props mdawaffe, fixes #20322.

Note: See TracTickets for help on using tickets.