Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
b1b55e3e
Commit
b1b55e3e
authored
15 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
* Make sure that PAP authentication uses the configured secret to decode the password
parent
961a9df1
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
smradius/modules/authentication/mod_auth_pap.pm
+6
-3
6 additions, 3 deletions
smradius/modules/authentication/mod_auth_pap.pm
with
6 additions
and
3 deletions
smradius/modules/authentication/mod_auth_pap.pm
+
6
−
3
View file @
b1b55e3e
...
...
@@ -24,6 +24,7 @@ use strict;
use
warnings
;
# Modules we need
use
smradius::
attributes
;
use
smradius::
constants
;
use
smradius::
logging
;
use
Digest::
MD5
;
...
...
@@ -84,8 +85,9 @@ sub authenticate
# print(STDERR "User-Pass: len = ".length($encPassword).", hex = ".unpack("H*",$encPassword)."\n");
# print(STDERR "\n\n");
# FIXME - test is the radius secret, must pull it from the configuration attributes??
my
$clearPassword
=
$packet
->
password
("
test
","
User-Password
");
# Decode the password using the secret
my
$clearPassword
=
$packet
->
password
(
getAttributeValue
(
$user
->
{'
ConfigAttributes
'},"
SMRadius-Config-Secret
"),
"
User-Password
");
# print(STDERR "CALC\n");
# print(STDERR "Result : len = ".length($clearPassword).", hex = ".unpack("H*",$clearPassword).", password = $clearPassword\n");
...
...
@@ -100,7 +102,8 @@ sub authenticate
return
MOD_RES_ACK
;
}
}
else
{
$server
->
log
(
LOG_NOTICE
,"
[MOD_AUTH_PAP] No valid operators for attribute 'User-Password', supported operators are: ==
");
$server
->
log
(
LOG_NOTICE
,"
[MOD_AUTH_PAP] No valid operators for attribute 'User-Password',
"
.
"
supported operators are: ==
");
}
}
else
{
$server
->
log
(
LOG_NOTICE
,"
[MOD_AUTH_PAP] No 'User-Password' attribute, cannot authenticate
");
...
...
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