Commit c4b27b9c authored by Yadd's avatar Yadd

Use PE_BADCREDENTIALS instead of 403 (#707)

parent 6943c49c
......@@ -5,6 +5,7 @@ use Mouse;
use GSSAPI;
use MIME::Base64;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_BADCREDENTIALS
PE_ERROR
PE_OK
PE_SENDRESPONSE
......@@ -26,7 +27,7 @@ sub extractFormInfo {
unless ($auth) {
$req->response(
[
410,
401,
[ 'WWW-Authenticate' => 'Negotiate' ],
['Authentication required']
]
......@@ -35,14 +36,13 @@ sub extractFormInfo {
}
if ( $auth !~ /^Negotiate (.*)$/ ) {
$self->userLogger->error('Bad authorization header');
$req->response( [ 403, [], ['Forbidden'] ] );
return PE_SENDRESPONSE;
return PE_BADCREDENTIALS;
}
my $data;
eval { $data = MIME::Base64::decode($1) };
if ($@) {
$self->userLogger->error( 'Bad authorization header: ' . $@ );
return PE_ERROR;
return PE_BADCREDENTIALS;
}
my $server_context;
my $status = GSSAPI::Context::accept(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment