Do not decode session values when replacing HTML templates var (#1141)

This commit is contained in:
Clément Oudot 2017-02-13 10:43:26 +00:00
parent 00b18caf6c
commit a213ff0ba0

View File

@ -316,7 +316,7 @@ sub _reset {
$body =~ s/\$expMailDate/$req->datas->{expMailDate}/ge; $body =~ s/\$expMailDate/$req->datas->{expMailDate}/ge;
$body =~ s/\$expMailTime/$req->datas->{expMailTime}/ge; $body =~ s/\$expMailTime/$req->datas->{expMailTime}/ge;
$body =~ s/\$url/$url/g; $body =~ s/\$url/$url/g;
$body =~ s/\$(\w+)/decode("utf8",$req->{sessionInfo}->{$1})/ge; $body =~ s/\$(\w+)/$req->{sessionInfo}->{$1}/ge;
# Send mail # Send mail
unless ( unless (
@ -438,7 +438,7 @@ sub changePwd {
# Replace variables in body # Replace variables in body
my $password = $req->datas->{newpassword}; my $password = $req->datas->{newpassword};
$body =~ s/\$password/$password/g; $body =~ s/\$password/$password/g;
$body =~ s/\$(\w+)/decode("utf8",$req->{sessionInfo}->{$1})/ge; $body =~ s/\$(\w+)/$req->{sessionInfo}->{$1}/ge;
# Send mail # Send mail
return PE_MAILERROR return PE_MAILERROR