Add $env macro also in all rules

environments/ppa-mbqj77/deployments/273
Xavier Guimard 7 years ago
parent 5c8f42bda4
commit 6133a7175b
  1. 3
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm

@ -552,8 +552,9 @@ sub substitute {
$expr =~ s/\$ip\b/\$ENV{REMOTE_ADDR}/sg;
# substitute vars with session data, excepts special vars $_ and $\d+
$expr =~ s/\$(?!ENV)([_a-zA-Z]\w*)/\$s->{$1}/sg;
$expr =~ s/\$(?!ENV|env)([_a-zA-Z]\w*)/\$s->{$1}/sg;
$expr =~ s/\$ENV\{/\$r->{env}->\{/g;
$expr =~ s/\$env->\{/\$r->{env}->\{/g;
return $expr;
}

Loading…
Cancel
Save