Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
f30e97df
Unverified
Commit
f30e97df
authored
6 years ago
by
Tim van Dijen
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
namespaced RADIUS_* globals
parent
2a4061b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/radius/lib/Auth/Source/Radius.php
+10
-10
10 additions, 10 deletions
modules/radius/lib/Auth/Source/Radius.php
with
10 additions
and
10 deletions
modules/radius/lib/Auth/Source/Radius.php
+
10
−
10
View file @
f30e97df
...
...
@@ -143,29 +143,29 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase
throw
new
\Exception
(
'Error adding radius servers, no servers available'
);
}
if
(
!
radius_create_request
(
$radius
,
RADIUS_ACCESS_REQUEST
))
{
if
(
!
radius_create_request
(
$radius
,
\
RADIUS_ACCESS_REQUEST
))
{
throw
new
\Exception
(
'Error creating radius request: '
.
radius_strerror
(
$radius
));
}
if
(
$this
->
realm
===
null
)
{
radius_put_attr
(
$radius
,
RADIUS_USER_NAME
,
$username
);
radius_put_attr
(
$radius
,
\
RADIUS_USER_NAME
,
$username
);
}
else
{
radius_put_attr
(
$radius
,
RADIUS_USER_NAME
,
$username
.
'@'
.
$this
->
realm
);
radius_put_attr
(
$radius
,
\
RADIUS_USER_NAME
,
$username
.
'@'
.
$this
->
realm
);
}
radius_put_attr
(
$radius
,
RADIUS_USER_PASSWORD
,
$password
);
radius_put_attr
(
$radius
,
\
RADIUS_USER_PASSWORD
,
$password
);
if
(
$this
->
nasIdentifier
!==
null
)
{
radius_put_attr
(
$radius
,
RADIUS_NAS_IDENTIFIER
,
$this
->
nasIdentifier
);
radius_put_attr
(
$radius
,
\
RADIUS_NAS_IDENTIFIER
,
$this
->
nasIdentifier
);
}
$res
=
radius_send_request
(
$radius
);
if
(
$res
!=
RADIUS_ACCESS_ACCEPT
)
{
if
(
$res
!=
\
RADIUS_ACCESS_ACCEPT
)
{
switch
(
$res
)
{
case
RADIUS_ACCESS_REJECT
:
case
\
RADIUS_ACCESS_REJECT
:
/* Invalid username or password. */
throw
new
\SimpleSAML\Error\Error
(
'WRONGUSERPASS'
);
case
RADIUS_ACCESS_CHALLENGE
:
case
\
RADIUS_ACCESS_CHALLENGE
:
throw
new
\Exception
(
'Radius authentication error: Challenge requested, but not supported.'
);
default
:
throw
new
\Exception
(
'Error during radius authentication: '
.
...
...
@@ -198,12 +198,12 @@ class Radius extends \SimpleSAML\Module\core\Auth\UserPassBase
}
/* Use the received user name */
if
(
$resa
[
'attr'
]
==
RADIUS_USER_NAME
)
{
if
(
$resa
[
'attr'
]
==
\
RADIUS_USER_NAME
)
{
$attributes
[
$this
->
usernameAttribute
]
=
array
(
$resa
[
'data'
]);
continue
;
}
if
(
$resa
[
'attr'
]
!==
RADIUS_VENDOR_SPECIFIC
)
{
if
(
$resa
[
'attr'
]
!==
\
RADIUS_VENDOR_SPECIFIC
)
{
continue
;
}
...
...
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