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

more consistency in hash keys syntax

parent d58fcee1
No related branches found
No related tags found
No related merge requests found
......@@ -87,17 +87,17 @@ sub add_test_account {
pod2usage(
-message => "missing account_profile option, aborting\n",
-verbose => 0
) unless $options{'account_profile'};
) unless $options{account_profile};
pod2usage(
-message => "missing sp_entityid option, aborting\n",
-verbose => 0
) unless $options{'sp_entityid'};
) unless $options{sp_entityid};
my $test_account = IdPAccountManager::Data::TestAccount->new(
db => $db,
account_profile => $options{'account_profile'},
sp_entityid => $options{'sp_entityid'}
account_profile => $options{account_profile},
sp_entityid => $options{sp_entityid}
);
die "Failed to create test account\n"
......@@ -105,7 +105,7 @@ sub add_test_account {
die "Failed to save test account\n"
unless $test_account->save(
accounts_validity_period => $configuration->{'accounts_validity_period'}
accounts_validity_period => $configuration->{accounts_validity_period}
);
printf "Account created:\n\tuserid: user%d\n\tpassword: %s\n",
......@@ -115,17 +115,16 @@ sub add_test_account {
sub list_test_accounts {
my %args;
if ($options{'sp_entityid'}) {
push @{ $args{'query'} }, 'sp_entityid' => $options{'sp_entityid'};
if ($options{sp_entityid}) {
push @{ $args{query} }, sp_entityid => $options{sp_entityid};
}
if ($options{'account_profile'}) {
push @{ $args{'query'} },
'account_profile' => $options{'account_profile'};
if ($options{account_profile}) {
push @{ $args{query} }, account_profile => $options{account_profile};
}
if ($options{'filter_expired'}) {
push @{ $args{'query'} }, 'expiration_date' => { lt => time };
if ($options{filter_expired}) {
push @{ $args{query} }, expiration_date => { lt => time };
}
my $accounts =
......@@ -137,17 +136,17 @@ sub list_test_accounts {
foreach my $account (@$accounts) {
$account->print();
next unless $options{'delete'};
next unless $options{delete};
die "failed to delete test account\n"
unless $account->delete();
}
if ($options{'delete'}) {
if ($options{delete}) {
printf "%d accounts removed\n", @$accounts;
die "failed to update simpleSAMLphp configuration file\n"
unless IdPAccountManager::Tools::update_ssp_authsources(
$configuration->{'root_manager_dir'},
$configuration->{root_manager_dir},
$configuration
);
......@@ -162,24 +161,24 @@ sub parse_federation_metadata {
die "unable to load federation metadata\n"
unless $federation_metadata->load(
federation_metadata_file_path =>
$configuration->{'federation_metadata_file_path'}
$configuration->{federation_metadata_file_path}
);
my %args;
if ($options{'sp_entityid'}) {
$args{'filter_entity_id'} = $options{'sp_entityid'};
if ($options{sp_entityid}) {
$args{filter_entity_id} = $options{sp_entityid};
}
die "unable to parse federation metadata\n"
unless $federation_metadata->parse(%args);
printf "Document %s parsed\n",
$configuration->{'federation_metadata_file_path'};
$configuration->{federation_metadata_file_path};
## List SAML entities
printf "Hashref representing the metadata:\n";
IdPAccountManager::Tools::dump_var(
$federation_metadata->{'federation_metadata_as_hashref'},
$federation_metadata->{federation_metadata_as_hashref},
0, \*STDOUT);
}
......@@ -189,33 +188,33 @@ sub add_service_provider {
pod2usage(
-message => "missing sp_entityid option, aborting\n",
-verbose => 0
) unless $options{'sp_entityid'};
) unless $options{sp_entityid};
pod2usage(
-message => "missing contacts option, aborting\n",
-verbose => 0
) unless $options{'contacts'};
) unless $options{contacts};
## Check if entry already exists in DB first
my $service_provider =
IdPAccountManager::Data::ServiceProvider->new(
db => $db,
entityid => $options{'sp_entityid'}
entityid => $options{sp_entityid}
);
if ($service_provider->load(speculative => 1)) {
printf "Entry for %s already in DB; update it with new data\n",
$options{'sp_entityid'};
$options{sp_entityid};
$service_provider->contacts($options{'contacts'});
$service_provider->displayname($options{'displayname'})
if ($options{'displayname'});
$service_provider->contacts($options{contacts});
$service_provider->displayname($options{displayname})
if ($options{displayname});
} else {
$service_provider = IdPAccountManager::Data::ServiceProvider->new(
db => $db,
entityid => $options{'sp_entityid'},
contacts => $options{'contacts'},
displayname => $options{'displayname'}
entityid => $options{sp_entityid},
contacts => $options{contacts},
displayname => $options{displayname}
);
die "failed to create service provider\n"
unless $service_provider;
......@@ -246,15 +245,15 @@ sub list_service_providers {
sub list_authentication_tokens {
my %args;
if ($options{'sp_entityid'}) {
push @{ $args{'query'} }, 'sp_entityid' => $options{'sp_entityid'};
if ($options{sp_entityid}) {
push @{ $args{query} }, sp_entityid => $options{sp_entityid};
}
if ($options{'token'}) {
push @{ $args{'query'} }, 'token' => $options{'token'};
if ($options{token}) {
push @{ $args{query} }, token => $options{token};
}
if ($options{'filter_expired'}) {
push @{ $args{'query'} }, 'creation_date' =>
{ lt => time - ($configuration->{'tokens_validity_period'} * 3600) };
if ($options{filter_expired}) {
push @{ $args{query} }, creation_date =>
{ lt => time - ($configuration->{tokens_validity_period} * 3600) };
}
my $tokens =
......@@ -266,12 +265,12 @@ sub list_authentication_tokens {
foreach my $token (@$tokens) {
$token->print();
next unless $options{'delete'};
next unless $options{delete};
die "failed to delete authentication token\n"
unless $token->delete();
}
if ($options{'delete'}) {
if ($options{delete}) {
printf "%d tokens removed\n", @$tokens;
}
......@@ -281,8 +280,8 @@ sub list_authentication_tokens {
sub get_authentication_token {
my %args;
if ($options{'token'}) {
$args{'token'} = $options{'token'};
if ($options{token}) {
$args{token} = $options{token};
}
my $authentication_token =
......@@ -291,10 +290,10 @@ sub get_authentication_token {
die "No corresponding token found in DB\n"
unless $authentication_token->load();
if ($options{'sp_entityid'}) {
if ($options{sp_entityid}) {
die "Authentication token cannot be used for this SP\n"
unless $authentication_token->get('sp_entityid')
eq $options{'sp_entityid'};
eq $options{sp_entityid};
}
$authentication_token->print();
......@@ -306,17 +305,17 @@ sub add_authentication_token {
pod2usage(
-message => "missing email_address option, aborting\n",
-verbose => 0
) unless $options{'email_address'};
) unless $options{email_address};
pod2usage(
-message => "missing sp_entityid option, aborting\n",
-verbose => 0
) unless $options{'sp_entityid'};
) unless $options{sp_entityid};
my $authentication_token = IdPAccountManager::Data::AuthenticationToken->new(
db => $db,
'email_address' => $options{'email_address'},
'sp_entityid' => $options{'sp_entityid'}
db => $db,
email_address => $options{email_address},
sp_entityid => $options{sp_entityid}
);
die "failed to create authentication token\n"
......@@ -328,9 +327,9 @@ sub add_authentication_token {
unless $authentication_token->delete();
$authentication_token = IdPAccountManager::Data::AuthenticationToken->new(
db => $db,
'email_address' => $options{'email_address'},
'sp_entityid' => $options{'sp_entityid'}
db => $db,
email_address => $options{email_address},
sp_entityid => $options{sp_entityid}
);
die "failed to create authentication token\n"
unless $authentication_token;
......@@ -348,27 +347,27 @@ sub send_notice {
pod2usage(
-message => "missing email_address option, aborting\n",
-verbose => 0
) unless $options{'email_address'};
) unless $options{email_address};
my $logger = IdPAccountManager::Logger->new(
file => $configuration->{'log_file'},
verbosity => $configuration->{'log_level'}
file => $configuration->{log_file},
verbosity => $configuration->{log_level}
);
die "Failed to send mail notice to $options{'email_address'}\n"
die "Failed to send mail notice to $options{email_address}\n"
unless IdPAccountManager::Tools::mail_notice(
'template' => 'templates/mail/notification_generic_error.tt2.eml',
'data' => {},
'to' => $options{'email_address'},
'logger' => $logger,
'conf' => $configuration,
'admin_email' => $configuration->{'admin_email'},
'dev_no_mail_outside' => $configuration->{'dev_no_mail_outside'},
'dev_sp_contact' => $configuration->{'dev_sp_contact'},
'notice_from' => $configuration->{'notice_from'}
template => 'templates/mail/notification_generic_error.tt2.eml',
data => {},
to => $options{email_address},
logger => $logger,
conf => $configuration,
admin_email => $configuration->{admin_email},
dev_no_mail_outside => $configuration->{dev_no_mail_outside},
dev_sp_contact => $configuration->{dev_sp_contact},
notice_from => $configuration->{notice_from}
);
printf "Mail notice sent to $options{'email_address'}\n";
printf "Mail notice sent to $options{email_address}\n";
}
......
......@@ -40,13 +40,13 @@ my %actions = (
'account_wizard' => { 'title_en' => 'Select your Service Provider' },
'generate_token' => { 'title_en' => 'Generate an authentication token' },
'validate_token' => { 'title_en' => 'Complete Email Challenge' },
'home' => { 'title_en' => $Conf::global{'app_name'} },
'home' => { 'title_en' => $Conf::global{app_name} },
);
## Gives writes for the group
umask 0002;
chdir $Conf::global{'root_manager_dir'};
chdir $Conf::global{root_manager_dir};
my $configuration = IdPAccountManager::Configuration->new(
file => 'conf/IdPAccountManager.conf'
......
......@@ -51,7 +51,7 @@ sub save {
IdPAccountManager::Tools::sha256_hash($self->{user_password}));
$self->creation_date(time);
$self->expiration_date(
time + ($args{'accounts_validity_period'} * 3600 * 24));
time + ($args{accounts_validity_period} * 3600 * 24));
}
$self->SUPER::save();
......
......@@ -29,7 +29,7 @@ sub new {
sub load {
my ($self, %args) = @_;
unless ($args{'federation_metadata_file_path'}) {
unless ($args{federation_metadata_file_path}) {
$self->{logger}->log(
level => LOG_ERROR,
message => "Missing parameter 'federation_metadata_file_path'"
......@@ -37,34 +37,34 @@ sub load {
return undef;
}
$self->{'federation_metadata_file_path'} =
$args{'federation_metadata_file_path'};
$self->{federation_metadata_file_path} =
$args{federation_metadata_file_path};
unless (-r $self->{'federation_metadata_file_path'}) {
unless (-r $self->{federation_metadata_file_path}) {
$self->{logger}->log(
level => LOG_ERROR,
message =>
"Failed to read $args{'federation_metadata_file_path'} : $ERRNO"
"Failed to read $args{federation_metadata_file_path} : $ERRNO"
);
return undef;
}
unless ($self->{'federation_metadata_as_xml'} =
$self->_get_xml_object($args{'federation_metadata_file_path'}))
unless ($self->{federation_metadata_as_xml} =
$self->_get_xml_object($args{federation_metadata_file_path}))
{
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse file $args{'metadata_file'} : $ERRNO"
message => "Failed to parse file $args{metadata_file} : $ERRNO"
);
return undef;
}
my $root = $self->{'federation_metadata_as_xml'}->documentElement();
my $root = $self->{federation_metadata_as_xml}->documentElement();
unless ($root->nodeName() =~ /EntitiesDescriptor$/) {
$self->{logger}->(
level => LOG_ERROR,
message => sprintf(
"Root element of file $args{'federation_metadata_file_path'} is of type '%s'; should be 'EntitiesDescriptor'",
"Root element of file $args{federation_metadata_file_path} is of type '%s'; should be 'EntitiesDescriptor'",
$root->nodeName()
)
);
......@@ -79,17 +79,17 @@ sub parse {
my ($self, %args) = @_;
my %parser_args = (
'metadata_as_xml' => $self->{'federation_metadata_as_xml'},
'filter_entity_type' => 'sp'
metadata_as_xml => $self->{federation_metadata_as_xml},
filter_entity_type => 'sp'
);
if ($args{'filter_entity_id'}) {
$parser_args{'filter_entity_id'} = $args{'filter_entity_id'};
if ($args{filter_entity_id}) {
$parser_args{filter_entity_id} = $args{filter_entity_id};
}
$self->{'federation_metadata_as_hashref'} =
$self->{federation_metadata_as_hashref} =
$self->_parse_saml_metadata(%parser_args);
unless (defined $self->{'federation_metadata_as_hashref'}) {
unless (defined $self->{federation_metadata_as_hashref}) {
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse federation metadata"
......@@ -105,7 +105,7 @@ sub print {
my ($self, $fd) = @_;
$fd = \*STDOUT unless $fd;
my $root = $self->{'federation_metadata_as_xml'}->documentElement();
my $root = $self->{federation_metadata_as_xml}->documentElement();
print $fd $root->toString();
}
......@@ -167,7 +167,7 @@ sub _get_xml_object {
sub _parse_saml_metadata {
my ($self, %args) = @_;
my $root = $args{'metadata_as_xml'};
my $root = $args{metadata_as_xml};
my @extracted_array;
foreach my $EntityDescriptor (
......@@ -178,15 +178,15 @@ sub _parse_saml_metadata {
if ($EntityDescriptor->hasAttributes()) {
foreach my $attr ($EntityDescriptor->getAttribute('entityID')) {
$extracted_data->{'entityid'} = $attr;
$extracted_data->{entityid} = $attr;
}
}
next
if ($args{'filter_entity_id'}
&& ($args{'filter_entity_id'} ne $extracted_data->{'entityid'}));
if ($args{filter_entity_id}
&& ($args{filter_entity_id} ne $extracted_data->{entityid}));
$extracted_data->{'xml_md'} =
$extracted_data->{xml_md} =
IdPAccountManager::Tools::escape_xml($EntityDescriptor->toString());
foreach my $child ($EntityDescriptor->childNodes()) {
......@@ -196,7 +196,7 @@ sub _parse_saml_metadata {
if ($child->nodeName =~ /IDPSSODescriptor$/) {
$extracted_data->{'type'} = 'idp';
$extracted_data->{type} = 'idp';
foreach my $sso (
$child->getElementsByLocalName('SingleSignOnService'))
......@@ -206,24 +206,22 @@ sub _parse_saml_metadata {
#next unless ($sso->getAttribute('Binding') && defined $supported_saml_bindings{$sso->getAttribute('Binding')});
## On extrait les infos sur les endpoints
push @{ $extracted_data->{'idp_endpoints'} },
{
'type' => 'SingleSignOnService',
'binding' => $sso->getAttribute('Binding'),
'location' => $sso->getAttribute('Location'),
};
push @{ $extracted_data->{idp_endpoints} }, {
type => 'SingleSignOnService',
binding => $sso->getAttribute('Binding'),
location => $sso->getAttribute('Location'),
};
}
## Getting domains declared for scoped attributes
foreach my $scope ($child->getElementsByLocalName('Scope')) {
push @{ $extracted_data->{'domain'} },
$scope->textContent();
push @{ $extracted_data->{domain} }, $scope->textContent();
}
} elsif ($child->nodeName =~ /SPSSODescriptor$/) {
$extracted_data->{'type'} = 'sp';
$extracted_data->{type} = 'sp';
## We check the Binding of the ACS that should match "urn:oasis:names:tc:SAML:1.0:profiles:browser-post"
## We also check the index to select the ACS that has the lower index
......@@ -233,17 +231,15 @@ sub _parse_saml_metadata {
{
## Extracting endpoints information
push @{ $extracted_data->{'sp_endpoints'} },
{
'type' => 'AssertionConsumerService',
'binding' => $sso->getAttribute('Binding'),
'location' => $sso->getAttribute('Location'),
'index' => $sso->getAttribute('index'),
'isdefault' =>
IdPAccountManager::Tools::boolean2integer(
push @{ $extracted_data->{sp_endpoints} }, {
type => 'AssertionConsumerService',
binding => $sso->getAttribute('Binding'),
location => $sso->getAttribute('Location'),
index => $sso->getAttribute('index'),
isdefault => IdPAccountManager::Tools::boolean2integer(
$sso->getAttribute('isDefault')
)
};
)
};
#$self->{logger}->log(
# level => LOG_TRACE,
......@@ -262,7 +258,7 @@ sub _parse_saml_metadata {
{
## Requested attributes information
push @{ $extracted_data->{'requested_attribute'} },
push @{ $extracted_data->{requested_attribute} },
{
'friendly_name' =>
IdPAccountManager::Tools::encode_utf8(
......@@ -284,11 +280,11 @@ sub _parse_saml_metadata {
$child->getElementsByLocalName('RegistrationInfo'))
{
$extracted_data->{'registration_info'}
{'registration_authority'} =
$extracted_data->{registration_info}
{registration_authority} =
$registrationinfo->getAttribute('registrationAuthority');
$extracted_data->{'registration_info'}
{'registration_instant'} =
$extracted_data->{registration_info}
{registration_instant} =
$registrationinfo->getAttribute('registrationInstant');
foreach my $registrationpolicy (
$registrationinfo->getElementsByLocalName(
......@@ -296,8 +292,8 @@ sub _parse_saml_metadata {
)
{
if ($registrationpolicy->getAttribute('lang') eq 'en') {
$extracted_data->{'registration_info'}
{'registration_policy'} =
$extracted_data->{registration_info}
{registration_policy} =
IdPAccountManager::Tools::encode_utf8(
$registrationpolicy->textContent());
}
......@@ -305,14 +301,14 @@ sub _parse_saml_metadata {
}
} elsif ($child->nodeName =~ /ContactPerson$/) {
my %contact_details;
$contact_details{'type'} = $child->getAttribute('contactType');
if (defined $contact_details{'type'}) {
$contact_details{type} = $child->getAttribute('contactType');
if (defined $contact_details{type}) {
foreach my $contact_child ($child->childNodes()) {
$contact_details{ $contact_child->localName } =
IdPAccountManager::Tools::encode_utf8(
$contact_child->textContent());
}
push @{ $extracted_data->{'contacts'} }, \%contact_details;
push @{ $extracted_data->{contacts} }, \%contact_details;
}
}
......@@ -320,7 +316,7 @@ sub _parse_saml_metadata {
my $displayname ($child->getElementsByLocalName('DisplayName'))
{
$extracted_data->{'display_name'}
$extracted_data->{display_name}
{ $displayname->getAttribute('xml:lang') } =
IdPAccountManager::Tools::encode_utf8(
$displayname->textContent());
......@@ -328,10 +324,10 @@ sub _parse_saml_metadata {
## Set a default displayName in case no English version is provided
## However there is no way to determine the native displayName
## We take the first one as default
if ( !$extracted_data->{'default_display_name'}
if ( !$extracted_data->{default_display_name}
|| $displayname->getAttribute('xml:lang'))
{
$extracted_data->{'default_display_name'} =
$extracted_data->{default_display_name} =
IdPAccountManager::Tools::encode_utf8(
$displayname->textContent());
}
......@@ -342,7 +338,7 @@ sub _parse_saml_metadata {
my $description ($child->getElementsByLocalName('Description'))
{
$extracted_data->{'description'}
$extracted_data->{description}
{ $description->getAttribute('xml:lang') } =
IdPAccountManager::Tools::encode_utf8(
$description->textContent());
......@@ -355,7 +351,7 @@ sub _parse_saml_metadata {
->log(level => LOG_TRACE, message => "ContactPerson");
my %contact_details;
$contact_details{'type'} =
$contact_details{type} =
$contact->getAttribute('contactType');
foreach my $contact_child ($EntityDescriptor->childNodes()) {
$self->{logger}->log(
......@@ -367,33 +363,33 @@ sub _parse_saml_metadata {
IdPAccountManager::Tools::encode_utf8(
$contact_child->textContent());
}
push @{ $extracted_data->{'contacts'} }, \%contact_details;
push @{ $extracted_data->{contacts} }, \%contact_details;
}
foreach my $sso (
$child->getElementsByLocalName('OrganizationDisplayName'))
{
$extracted_data->{'organization'} =
$extracted_data->{organization} =
IdPAccountManager::Tools::encode_utf8($sso->textContent());
}
## Getting X.509 certificates
foreach my $cert ($child->getElementsByLocalName('X509Certificate'))
{
$extracted_data->{'certificate'} =
$extracted_data->{certificate} =
IdPAccountManager::Tools::encode_utf8($cert->textContent());
}
}
## Filter entities based on type
next
if (defined $args{'filter_entity_type'}
&& ($args{'filter_entity_type'} ne $extracted_data->{'type'}));
if (defined $args{filter_entity_type}
&& ($args{filter_entity_type} ne $extracted_data->{type}));
## Merge domains in a single string
my $domains = join(',', @{ $extracted_data->{'domain'} })
if ($extracted_data->{'domain'});
$extracted_data->{'domain'} = $domains;
my $domains = join(',', @{ $extracted_data->{domain} })
if ($extracted_data->{domain});
$extracted_data->{domain} = $domains;
#$self->{logger}->log(level => LOG_DEBUG, message => "Scopes : %s", $domains);
......@@ -418,8 +414,8 @@ SAMLMetadata - loading SAML federation metadata
}
my %args;
if ($options{'sp_entityid'}) {
$args{'filter_entity_id'} = $options{'sp_entityid'};
if ($options{sp_entityid}) {
$args{filter_entity_id} = $options{sp_entityid};
}
unless ($federation_metadata->parse(sp_entityid => 'https://test.federation.renater.fr/test/ressource')) {
......@@ -428,7 +424,7 @@ SAMLMetadata - loading SAML federation metadata
## List SAML entities
printf "Hashref representing the metadata:\n";
IdPAccountManager::Tools::dump_var($federation_metadata->{'federation_metadata_as_hashref'}, 0, \*STDOUT);
IdPAccountManager::Tools::dump_var($federation_metadata->{federation_metadata_as_hashref}, 0, \*STDOUT);
=head1 DESCRIPTION
......
......@@ -60,7 +60,7 @@ sub generate_password {
'0' .. '9', '_', '%', ';',
':', '!', '?', '&',
'$', '*', '(', ')',
'{', '}', '[', ']',
'{, }', '[', ']',
'.', '=', '-', '#'
);
foreach (6 .. $length_of_randomstring) {
......@@ -87,15 +87,15 @@ sub update_ssp_authsources {
my ($root_manager_dir, $conf) = @_;
my $tt2 = Template->new({
'INCLUDE_PATH' => $root_manager_dir . ':' .
$root_manager_dir . '/templates/accountProfiles'
INCLUDE_PATH => $root_manager_dir . ':' .
$root_manager_dir . '/templates/accountProfiles'
});
my %args = (
'accounts' => IdPAccountManager::TestAccount::Data::Manager->get_testaccounts(),
'conf' => $conf,
accounts => IdPAccountManager::TestAccount::Data::Manager->get_testaccounts(),
conf => $conf,
);
#chdir $Conf::global{'root_manager_dir'};
#chdir $Conf::global{root_manager_dir};
my $template_file = 'templates/accountProfiles/valid-accounts.php.tt2';
my $output_file = 'conf/valid-accounts.php';
......@@ -146,24 +146,24 @@ sub dump_var {
## data : data used by the TT2 parser
sub mail_notice {
my (%args) = @_;
my $tt2_file = $args{'template'};
my $mail_data = $args{'data'};
my $logger = $args{'logger'};
my $tt2_file = $args{template};
my $mail_data = $args{data};
my $logger = $args{logger};
$mail_data->{'conf'} ||= $args{'conf'};
$mail_data->{conf} ||= $args{conf};
my $notice_email = $args{'to'} || $args{'admin_email'};
$mail_data->{'to'} = $notice_email;
my $notice_email = $args{to} || $args{admin_email};
$mail_data->{to} = $notice_email;
## Protection to prevent notifications during test dev phases
## Notify only admin_email or dev_sp_contact addresses
if ($args{'dev_no_mail_outside'}) {
if ($args{dev_no_mail_outside}) {
my %rcpt = map { $_ => 1 } split(/,/, $notice_email);
my %authorized_rcpt = map { $_ => 1 } split(
/,/,
join(',',
$args{'admin_email'},
$args{'dev_sp_contact'})
$args{admin_email},
$args{dev_sp_contact})
);
my $change_rcpt = 0;
......@@ -182,18 +182,18 @@ sub mail_notice {
$notice_email
)
);
$notice_email = $args{'admin_email'};
$notice_email = $args{admin_email};
}
}
$logger->log(
level => LOG_TRACE,
message => sprintf('(template=%s, to=%s)', $in{'template'}, $mail_data->{'to'})
message => sprintf('(template=%s, to=%s)', $in{template}, $mail_data->{to})
);
open SENDMAIL,
"|/usr/sbin/sendmail -f "
. $args{'notice_from'}
. $args{notice_from}
. " $notice_email";
my $tt2 = Template->new(FILTERS => { qencode => [ \qencode, 0 ] });
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment