From: Eric Bollengier Date: Tue, 10 Nov 2009 14:08:57 +0000 (+0100) Subject: bweb: escape _ % for LIKE search X-Git-Tag: Release-5.0.0~275 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e447f896409696e20466665694410805abbeec8;p=bacula%2Fbacula bweb: escape _ % for LIKE search --- diff --git a/gui/bweb/cgi/bresto.pl b/gui/bweb/cgi/bresto.pl index 662504f32c..9442a552cb 100755 --- a/gui/bweb/cgi/bresto.pl +++ b/gui/bweb/cgi/bresto.pl @@ -914,6 +914,7 @@ sub fill_table_for_restore foreach my $dirid (@dirid) { my $p = $bvfs->get_path($dirid); + $p =~ s/([%_\\])/\\$1/g; # Escape % and _ for LIKE search $p = $bvfs->dbh_quote($p); push @union, " (SELECT File.JobId, File.FileIndex, File.FilenameId, File.PathId $FileId