Skip to content

Commit

Permalink
Fixes #1499 - whitelist embeds from ZippCast
Browse files Browse the repository at this point in the history
  • Loading branch information
sgsabbage committed Aug 10, 2015
1 parent e8c1ed3 commit 6440be1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cgi-bin/DW/Hooks/EmbedWhitelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ my %host_path_match = (
"vine.co" => [ qr!^/v/[a-zA-Z0-9]{11}/embed/simple$!, 1 ],
# Videos seemed to use an 11-character identification; may need to be changed

"www.zippcast.com" => [ qr!^/videoview\.php$!, 0 ]

);

LJ::Hooks::register_hook( 'allow_iframe_embeds', sub {
Expand Down
4 changes: 3 additions & 1 deletion t/embed-whitelist.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use strict;
use warnings;

use Test::More tests => 56;
use Test::More tests => 57;

BEGIN { $LJ::_T_CONFIG = 1; require "$ENV{LJHOME}/cgi-bin/ljlib.pl"; }

Expand Down Expand Up @@ -140,6 +140,8 @@ note( "misc" );

test_good_url( "https://screen.yahoo.com/fashion-photographer-life-changed-chance-193621376.html?format=embed" );

test_good_url( "//www.zippcast.com/videoview.php?vplay=6c91dae3fc1bc909db0&auto=no" );

}


0 comments on commit 6440be1

Please sign in to comment.