Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Access Check - Account manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Access Check - Account manager
Commits
c214c33b
Commit
c214c33b
authored
7 years ago
by
Guillaume ROUSSE
Browse files
Options
Downloads
Patches
Plain Diff
don't pass logger, handler error from caller
parent
76504725
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/IdPAccountManager/Tools.pm
+3
-8
3 additions, 8 deletions
lib/IdPAccountManager/Tools.pm
lib/IdPAccountManager/WebRequest.pm
+20
-16
20 additions, 16 deletions
lib/IdPAccountManager/WebRequest.pm
with
23 additions
and
24 deletions
lib/IdPAccountManager/Tools.pm
+
3
−
8
View file @
c214c33b
...
...
@@ -112,11 +112,6 @@ sub mail_notice {
my
(
%args
)
=
@_
;
my
$tt2_file
=
$args
{
template
};
my
$mail_data
=
$args
{
data
};
my
$logger
=
$args
{
logger
};
$logger
->
tracef
(
sprintf
('
(template=%s, to=%s)
',
$args
{
template
},
$args
{
to
})
);
open
SENDMAIL
,
"
|/usr/sbin/sendmail -f
$args
{from}
$args
{to}
";
...
...
@@ -125,9 +120,9 @@ sub mail_notice {
FILTERS
=>
{
qencode
=>
[
\
&qencode
,
0
]
},
INCLUDE_PATH
=>
$args
{
templates_dir
}
});
unless
(
$tt2
->
process
(
$tt2_file
,
$mail_data
,
\
*SENDMAIL
)
)
{
$logger
->
errorf
("
Error TT2 : %s
",
$tt2
->
error
()
)
;
}
$tt2
->
process
(
$tt2_file
,
$mail_data
,
\
*SENDMAIL
)
or
die
$tt2
->
error
();
close
SENDMAIL
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/IdPAccountManager/WebRequest.pm
+
20
−
16
View file @
c214c33b
...
...
@@ -185,14 +185,16 @@ sub respond {
## Mail notification of admins about the error
if
(
@errors_admin
)
{
$self
->
{
out
}
->
{
subject
}
=
'
Error notification - web interface
';
IdPAccountManager::Tools::
mail_notice
(
template
=>
'
mail/notification_generic_error.tt2.eml
',
templates_dir
=>
$self
->
{
configuration
}
->
{
templates_dir
},
data
=>
$self
->
{
out
},
logger
=>
$self
->
{
logger
},
to
=>
$self
->
{
configuration
}
->
{
admin_email
},
from
=>
$self
->
{
configuration
}
->
{
notice_from
}
);
eval
{
IdPAccountManager::Tools::
mail_notice
(
template
=>
'
mail/notification_generic_error.tt2.eml
',
templates_dir
=>
$self
->
{
configuration
}
->
{
templates_dir
},
data
=>
$self
->
{
out
},
to
=>
$self
->
{
configuration
}
->
{
admin_email
},
from
=>
$self
->
{
configuration
}
->
{
notice_from
}
);
};
$self
->
{
logger
}
->
errorf
("
Error TT2 : %s
",
$EVAL_ERROR
)
if
$EVAL_ERROR
;
}
}
...
...
@@ -409,14 +411,16 @@ sub req_generate_token {
$self
->
{
out
}
->
{
subtitle
}
=
'
Generate an authentication token
';
## Send the challenge email with the token
IdPAccountManager::Tools::
mail_notice
(
template
=>
'
mail/send_authentication_token.tt2.eml
',
templates_dir
=>
$self
->
{
configuration
}
->
{
templates_dir
},
from
=>
$self
->
{
configuration
}
->
{
notice_from
}
to
=>
$self
->
{
in
}
->
{
email_address
},
data
=>
$self
->
{
out
},
logger
=>
$self
->
{
logger
}
);
eval
{
IdPAccountManager::Tools::
mail_notice
(
template
=>
'
mail/send_authentication_token.tt2.eml
',
templates_dir
=>
$self
->
{
configuration
}
->
{
templates_dir
},
from
=>
$self
->
{
configuration
}
->
{
notice_from
}
to
=>
$self
->
{
in
}
->
{
email_address
},
data
=>
$self
->
{
out
},
);
};
$self
->
{
logger
}
->
errorf
("
Error TT2 : %s
",
$EVAL_ERROR
)
if
$EVAL_ERROR
;
$self
->
{
logger
}
->
infof
(
"
Token send to %s for sp_entityid=%s;token=%s
",
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment