make tidy
This commit is contained in:
parent
b2620c2679
commit
0f7b3ca71d
|
@ -744,8 +744,7 @@ sub metadata {
|
|||
}
|
||||
else {
|
||||
$self->logger->info(
|
||||
"REST request to get configuration metadata ($res->{cfgNum})"
|
||||
);
|
||||
"REST request to get configuration metadata ($res->{cfgNum})" );
|
||||
}
|
||||
return $self->sendJSONresponse( $req, $res );
|
||||
}
|
||||
|
|
|
@ -405,8 +405,7 @@ sub postUrlInit {
|
|||
$class->buildSub($sub) )
|
||||
{
|
||||
$class->tsv->{maintenance}->{$vhost} = 1;
|
||||
$class->logger->error(
|
||||
"$class: Unable to build post data: "
|
||||
$class->logger->error( "$class: Unable to build post data: "
|
||||
. $class->tsv->{jail}->error );
|
||||
}
|
||||
|
||||
|
|
|
@ -377,6 +377,7 @@ sub diff {
|
|||
( scalar( $req->param('conf1') ), scalar( $req->param('conf2') ) );
|
||||
my @conf;
|
||||
$self->logger->debug(" Loading confs");
|
||||
|
||||
# Load the 2 configurations
|
||||
for ( my $i = 0 ; $i < 2 ; $i++ ) {
|
||||
if ( %{ $self->currentConf }
|
||||
|
|
|
@ -145,8 +145,7 @@ sub getStack {
|
|||
my ( $self, $req, @steps ) = @_;
|
||||
return $req->data->{combinationStack}
|
||||
if ( $req->data->{combinationStack} );
|
||||
my $stack = $req->data->{combinationStack} =
|
||||
$self->stackSub->( $req->env );
|
||||
my $stack = $req->data->{combinationStack} = $self->stackSub->( $req->env );
|
||||
unless ($stack) {
|
||||
$self->logger->error('No authentication scheme for this user');
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ sub extractFormInfo {
|
|||
my ( $self, $req ) = @_;
|
||||
|
||||
if ( $req->data->{_krbUser} ) {
|
||||
$self->logger->debug( 'Kerberos ticket already validated for '
|
||||
. $req->data->{_krbUser} );
|
||||
$self->logger->debug(
|
||||
'Kerberos ticket already validated for ' . $req->data->{_krbUser} );
|
||||
return PE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,11 @@ sub extractFormInfo {
|
|||
my $check_url = $claimed_identity->check_url(
|
||||
return_to => $self->conf->{portal}
|
||||
. '?openid=1&'
|
||||
. ( $req->data->{_url} ? build_urlencoded( url => $req->data->{_url} ) : '' ),
|
||||
. (
|
||||
$req->data->{_url}
|
||||
? build_urlencoded( url => $req->data->{_url} )
|
||||
: ''
|
||||
),
|
||||
trust_root => $self->conf->{portal},
|
||||
delayed_return => 1,
|
||||
);
|
||||
|
|
|
@ -166,9 +166,11 @@ sub ssoMatch {
|
|||
my ( $self, $req ) = @_;
|
||||
my $url = $self->normalize_url( $req->uri, $self->conf->{issuerDBSAMLPath},
|
||||
$self->ssoGetUrl );
|
||||
return ( $url =~ $self->ssoUrlRe or $req->data->{_proxiedRequest}
|
||||
return (
|
||||
$url =~ $self->ssoUrlRe or $req->data->{_proxiedRequest}
|
||||
? 1
|
||||
: 0);
|
||||
: 0
|
||||
);
|
||||
}
|
||||
|
||||
# Main method (launched only for authenticated users, see Main/Issuer)
|
||||
|
|
|
@ -115,7 +115,6 @@ sub display {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
# 1.3 There is a message to display
|
||||
elsif ( my $info = $req->info ) {
|
||||
$self->logger->debug('Display: info detected');
|
||||
|
|
|
@ -161,8 +161,7 @@ sub deleteSession {
|
|||
|
||||
# TODO
|
||||
# Collect logout services and build hidden iFrames
|
||||
if ( $req->data->{logoutServices} and %{ $req->data->{logoutServices} } )
|
||||
{
|
||||
if ( $req->data->{logoutServices} and %{ $req->data->{logoutServices} } ) {
|
||||
|
||||
$self->logger->debug("Create iFrames to forward logout to services");
|
||||
|
||||
|
|
|
@ -488,8 +488,7 @@ sub display {
|
|||
DISPLAY_PASSWORD_FORM => 0,
|
||||
);
|
||||
if ( $req->data->{mailToken}
|
||||
and !$self->p->checkXSSAttack( 'mail_token', $req->data->{mailToken} )
|
||||
)
|
||||
and !$self->p->checkXSSAttack( 'mail_token', $req->data->{mailToken} ) )
|
||||
{
|
||||
$tplPrm{MAIL_TOKEN} = $req->data->{mailToken};
|
||||
}
|
||||
|
|
|
@ -398,8 +398,9 @@ sub display {
|
|||
STARTMAILDATE => $req->data->{startMailDate},
|
||||
STARTMAILTIME => $req->data->{startMailTime},
|
||||
MAILALREADYSENT => $req->data->{mail_already_sent},
|
||||
MAIL => $self->p->checkXSSAttack( 'mail',
|
||||
$req->data->{registerInfo}->{mail} ) ? ""
|
||||
MAIL => $self->p->checkXSSAttack(
|
||||
'mail', $req->data->{registerInfo}->{mail}
|
||||
) ? ""
|
||||
: $req->data->{registerInfo}->{mail},
|
||||
FIRSTNAME => $self->p->checkXSSAttack( 'firstname',
|
||||
$req->data->{registerInfo}->{firstname} ) ? ""
|
||||
|
|
|
@ -38,8 +38,8 @@ sub createUser {
|
|||
);
|
||||
|
||||
if ( $mesg->is_error ) {
|
||||
$self->userLogger->error( "Can not create entry for "
|
||||
. $req->data->{registerInfo}->{login} );
|
||||
$self->userLogger->error(
|
||||
"Can not create entry for " . $req->data->{registerInfo}->{login} );
|
||||
$self->logger->error( "LDAP error " . $mesg->error );
|
||||
|
||||
$self->ldap->unbind();
|
||||
|
|
|
@ -67,8 +67,8 @@ sub createUser {
|
|||
);
|
||||
|
||||
if ( $mesg->is_error ) {
|
||||
$self->userLogger->error( "Can not create entry for "
|
||||
. $req->data->{registerInfo}->{login} );
|
||||
$self->userLogger->error(
|
||||
"Can not create entry for " . $req->data->{registerInfo}->{login} );
|
||||
$self->logger->error( "LDAP error " . $mesg->error );
|
||||
|
||||
$self->ldap->unbind();
|
||||
|
|
|
@ -89,8 +89,7 @@ ok(
|
|||
);
|
||||
count(1);
|
||||
my $pdata = 'lemonldappdata=' . expectCookie( $res, 'lemonldappdata' );
|
||||
my ($query) =
|
||||
expectRedirection( $res, qr#^http://auth.sp.com/# );
|
||||
my ($query) = expectRedirection( $res, qr#^http://auth.sp.com/# );
|
||||
|
||||
# Back to SP
|
||||
switch ('sp');
|
||||
|
|
|
@ -181,12 +181,20 @@ SKIP: {
|
|||
# Push OP response to Proxy
|
||||
switch ('proxy');
|
||||
|
||||
ok( $res = $proxy->_get( '/', query => $query, accept => 'text/html', cookie => $proxyPdata ),
|
||||
'Call openidconnectcallback on Proxy' );
|
||||
ok(
|
||||
$res = $proxy->_get(
|
||||
'/',
|
||||
query => $query,
|
||||
accept => 'text/html',
|
||||
cookie => $proxyPdata
|
||||
),
|
||||
'Call openidconnectcallback on Proxy'
|
||||
);
|
||||
count(1);
|
||||
my $proxyId = expectCookie($res);
|
||||
( $url, $query ) = expectRedirection( $res,
|
||||
qr#http://auth.proxy.com(/saml[^\?]*)(?:\?(.+))?$# );
|
||||
|
||||
#$proxyPdata = 'lemonldappdata=' . expectCookie($res, 'lemonldappdata');
|
||||
|
||||
ok(
|
||||
|
|
|
@ -150,8 +150,7 @@ qr'^http://auth.idp.com/cas/login\?(service=http%3A%2F%2Fauth.proxy.com%2F.*)$'
|
|||
'Query CAS server'
|
||||
);
|
||||
my $idpPdata = 'lemonldappdata=' . expectCookie( $res, 'lemonldappdata' );
|
||||
( $host, $url, $query ) =
|
||||
expectForm( $res );
|
||||
( $host, $url, $query ) = expectForm($res);
|
||||
$query =~ s/&?user=//;
|
||||
|
||||
# Try to authenticate to IdP
|
||||
|
|
|
@ -181,8 +181,15 @@ SKIP: {
|
|||
# Push OP response to Proxy
|
||||
switch ('proxy');
|
||||
|
||||
ok( $res = $proxy->_get( '/', query => $query, accept => 'text/html', cookie => $proxyPdata ),
|
||||
'Call openidconnectcallback on Proxy' );
|
||||
ok(
|
||||
$res = $proxy->_get(
|
||||
'/',
|
||||
query => $query,
|
||||
accept => 'text/html',
|
||||
cookie => $proxyPdata
|
||||
),
|
||||
'Call openidconnectcallback on Proxy'
|
||||
);
|
||||
count(1);
|
||||
my $proxyId = expectCookie($res);
|
||||
( $url, $query ) = expectRedirection( $res,
|
||||
|
|
Loading…
Reference in New Issue
Block a user