From 81e0d15fe4dae41b94d9206c7545e541c04fdf00 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Tue, 7 Nov 2017 10:49:09 +0100 Subject: [PATCH] partial revert --- lib/IdPAccountManager/WebRequest.pm | 14 +++++++++----- templates/mail/send_authentication_token.tt2.eml | 14 +++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm index 714434b..54f798e 100755 --- a/lib/IdPAccountManager/WebRequest.pm +++ b/lib/IdPAccountManager/WebRequest.pm @@ -193,8 +193,10 @@ sub respond { REMOTE_HOST => $ENV{REMOTE_HOST}, REMOTE_ADDR => $ENV{REMOTE_ADDR}, }, - app_name => $self->{configuration}->{app_name}, - app_url => $self->{configuration}->{app_url}, + conf => { + app_name => $self->{configuration}->{app_name}, + app_url => $self->{configuration}->{app_url}, + }, from => $self->{configuration}->{notice_from}, to => $self->{configuration}->{admin_email}, errors => $self->{out}->{errors} @@ -424,10 +426,12 @@ sub req_generate_token { REMOTE_HOST => $ENV{REMOTE_HOST}, REMOTE_ADDR => $ENV{REMOTE_ADDR}, }, - app_name => $self->{configuration}->{app_name}, - app_url => $self->{configuration}->{app_url}, + conf => { + app_name => $self->{configuration}->{app_name}, + app_url => $self->{configuration}->{app_url}, + support_email => $self->{configuration}->{support_email}, + }, from => $self->{configuration}->{notice_from}, - support_email => $self->{configuration}->{support_email}, to => $self->{in}->{email_address}, sp_entityid => $self->{in}->{sp_entityid}, authentication_token => $authentication_token->get('token'), diff --git a/templates/mail/send_authentication_token.tt2.eml b/templates/mail/send_authentication_token.tt2.eml index 1d748e6..5539015 100644 --- a/templates/mail/send_authentication_token.tt2.eml +++ b/templates/mail/send_authentication_token.tt2.eml @@ -1,18 +1,18 @@ -From: [% app_name %] <[% from %]> +From: [% conf.app_name %] <[% from %]> To: [% to %] -Subject: [% app_name %] - Test accounts request +Subject: [% conf.app_name %] - Test accounts request Content-type: text/plain; charset=UTF-8; format=flowed -This is an email challenge automatically sent to you by [% app_name %]. Somebody with IP address [% env.REMOTE_ADDR %] has requested to create test accounts for eduGAIN Service Provider with entityID [% sp_entityid %]. +This is an email challenge automatically sent to you by [% conf.app_name %]. Somebody with IP address [% env.REMOTE_ADDR %] has requested to create test accounts for eduGAIN Service Provider with entityID [% sp_entityid %]. The address [% to %] is mentioned in the eduGAIN metadata as a contact for this Service Provider. -To complete the creation of test accounts, paste the following validation token in the [% app_name %] web form. +To complete the creation of test accounts, paste the following validation token in the [% conf.app_name %] web form. Validation token: [% authentication_token %] -[% app_name %]: [% app_url %] +[% conf.app_name %]: [% conf.app_url %] -If the creation of test accounts was not initiated by you or a fellow administrator for the above Service Provider, please forward this email and contact [% conf.support_email %] to inform them about a potential abuse of the [% app_name %] service. +If the creation of test accounts was not initiated by you or a fellow administrator for the above Service Provider, please forward this email and contact [% conf.support_email %] to inform them about a potential abuse of the [% conf.app_name %] service. Best Regards -[% app_name %] Bot +[% conf.app_name %] Bot -- GitLab