Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
c4b27b9c
Commit
c4b27b9c
authored
Apr 05, 2017
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PE_BADCREDENTIALS instead of 403 (#707)
parent
6943c49c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
+4
-4
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Kerberos.pm
View file @
c4b27b9c
...
...
@@ -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
(
[
4
10
,
4
01
,
[
'
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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment