Skip to content
Snippets Groups Projects
Commit e3ce6ce2 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

only pass needed variables to templates

parent 5b2c49f9
Branches
Tags
No related merge requests found
...@@ -85,10 +85,20 @@ sub execute { ...@@ -85,10 +85,20 @@ sub execute {
# initialize output parameters # initialize output parameters
$self->{out} = { $self->{out} = {
url_cgi => $ENV{SCRIPT_NAME}, env => {
env => \%ENV, REMOTE_HOST => $ENV{REMOTE_HOST},
actions => \%actions, REMOTE_ADDR => $ENV{REMOTE_ADDR},
conf => $self->{configuration}, SCRIPT_NAME => $ENV{SCRIPT_NAME}
},
conf => {
accounts_validity_period => $self->{configuration}->{accounts_validity_period},
app_name => $self->{configuration}->{app_name},
app_url => $self->{configuration}->{app_url},
idp_scope => $self->{configuration}->{idp_scope},
idp_displayname => $self->{configuration}->{idp_displayname},
support_email => $self->{configuration}->{support_email},
version => $self->{configuration}->{version},
}
}; };
# process input parameters # process input parameters
...@@ -152,13 +162,6 @@ sub respond { ...@@ -152,13 +162,6 @@ sub respond {
my ($self) = @_; my ($self) = @_;
$self->{logger}->log(level => LOG_DEBUG, message => ""); $self->{logger}->log(level => LOG_DEBUG, message => "");
## Automatic pass object entries to the output hash
foreach my $key (keys %{$self}) {
$self->{out}{$key} ||= $self->{$key}
unless ($key eq 'out');
}
## Parse template ## Parse template
my $tt2 = Template->new( my $tt2 = Template->new(
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment