Fix regex order (#1988)

This commit is contained in:
Christophe Maudoux 2019-10-27 21:05:35 +01:00
parent 04428af556
commit 009dcb35ae

View File

@ -199,10 +199,10 @@ sub virtualHosts {
if ( $query eq 'locationRules' ) {
$res->{comment} = '';
$res->{level} = '';
$res->{level} = $1 if ( $r =~ s/\(\?#AuthnLevel=(-?\d+)\)// );
if ( $r =~ s/\(\?#(.*?)\)// ) {
$res->{title} = $res->{comment} = $1;
}
$res->{level} = $1 if ( $r =~ s/\(\?#AuthnLevel=(-?\d+)\)// );
$res->{re} = $r;
$res->{type} = 'rule';
}