From 085d766a0524e399d0c9c9e807d8c0acd0da6a19 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Jul 2015 12:49:03 +0100 Subject: [PATCH] Bug 12885: Fix if url contains +*... and HTML5 Media is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The special regex chars are not escaped in C4::HTML5Media. Test plan: 1/ Set 856$u=http://www.mrqe.com/lookup?talented+mr.+ripley 2/ Enable the pref HTML5Media 3/ Go on the detail page It should not explode. Signed-off-by: Mirko Tietgen Signed-off-by: Joonas Kylmälä Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/HTML5Media.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm index d587e5ff3f..c8c8a77ca8 100644 --- a/C4/HTML5Media.pm +++ b/C4/HTML5Media.pm @@ -110,7 +110,7 @@ sub gethtml5media { } # extension $HTML5Media{extension} = ($HTML5Media{srcblock} =~ m/([^.]+)$/)[0]; - if ( !grep /$HTML5Media{extension}/, @HTML5MediaExtensions ) { + if ( !grep /\Q$HTML5Media{extension}\E/, @HTML5MediaExtensions ) { next; # not a specified media file } # mime -- 2.39.5