diff options
| author | czaks <marcin@6irc.net> | 2015-07-08 16:26:58 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-07-08 16:26:58 +0200 |
| commit | d3d167affb7f2ac7708e8fe54658df594b6f672c (patch) | |
| tree | 5285999c80899d2dca5161d8b49dcdbf0d6dc289 /inc/config.php | |
| parent | 3f29bdfac92cfff13b234f3abc9d92bd5b9a2a37 (diff) | |
SECURITY: XSS fix for youtube.js/metacafe embed
Diffstat (limited to 'inc/config.php')
| -rw-r--r-- | inc/config.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/config.php b/inc/config.php index 32308bd4..75506645 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1022,7 +1022,7 @@ '<object style="float: left;margin: 10px 20px;" width="%%tb_width%%" height="%%tb_height%%"><param name="movie" value="http://www.dailymotion.com/swf/video/$2"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"><embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/$2" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowfullscreen="true" allowscriptaccess="always"></object>' ), array( - '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?.+)?$/i', + '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^\'"<>]+)?$/i', '<div style="float:left;margin:10px 20px;width:%%tb_width%%px;height:%%tb_height%%px"><embed flashVars="playerVars=showStats=no|autoPlay=no" src="http://www.metacafe.com/fplayer/$2/$3.swf" width="%%tb_width%%" height="%%tb_height%%" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_$2" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></div>' ), array( @@ -1665,6 +1665,6 @@ // Youtube.js embed HTML code $config['youtube_js_html'] = '<div class="video-container" data-video="$2">'. - '<a href="$0" target="_blank" class="file">'. + '<a href="https://youtu.be/$2" target="_blank" class="file">'. '<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>'. '</a></div>'; |
