mirror of
https://github.com/webmin/webmin.git
synced 2026-06-19 10:50:21 +01:00
Only escape if there are regexp characters https://github.com/webmin/usermin/issues/37
This commit is contained in:
@@ -85,7 +85,9 @@ else {
|
||||
$filter->{'condheader'} =~ /^[a-zA-Z0-9\-]+$/ ||
|
||||
&error($text{'save_econdheader'});
|
||||
if (!$in{'condregexp'} &&
|
||||
$in{'condvalue'} !~ /^[a-zA-Z0-9_ ]+$/) {
|
||||
$in{'condvalue'} =~ /[\^\$\.\*\+\?\|\(\)\[\]\{\}\\]/) {
|
||||
# If the user didn't ask for a regexp but there are
|
||||
# regexp special characters, escape them
|
||||
$in{'condvalue'} = quotemeta($in{'condvalue'});
|
||||
}
|
||||
if ($in{'condmode'} == 0) {
|
||||
|
||||
Reference in New Issue
Block a user