Fix regex order (#1988)

register-approval
Christophe Maudoux 6 years ago
parent 04428af556
commit 009dcb35ae
  1. 2
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/RESTServer.pm

@ -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';
}

Loading…
Cancel
Save