Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
smradius
smradius
Commits
196bb8f5
Commit
196bb8f5
authored
8 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
BUGFIX: Fixed incorrect realm name displaying when using the <DEFAULT> realm
parent
f396ee22
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!422
Fixes for default '<DEFUALT>' and blank '' realms
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/smradius/modules/system/mod_config_sql.pm
+5
-3
5 additions, 3 deletions
lib/smradius/modules/system/mod_config_sql.pm
with
5 additions
and
3 deletions
lib/smradius/modules/system/mod_config_sql.pm
+
5
−
3
View file @
196bb8f5
...
@@ -198,11 +198,11 @@ sub getConfig
...
@@ -198,11 +198,11 @@ sub getConfig
# Extract realm from username
# Extract realm from username
if
(
defined
(
$user
->
{'
Username
'})
&&
$user
->
{'
Username
'}
=~
/^\S+(?:@(\S+))?$/
)
{
if
(
defined
(
$user
->
{'
Username
'})
&&
$user
->
{'
Username
'}
=~
/^\S+(?:@(\S+))?$/
)
{
$realmName
=
$
1
//
"";
my
$userRealm
=
$
1
//
"";
$server
->
log
(
LOG_DEBUG
,"
Processing attributes for realm '
$
realmName
'
");
$server
->
log
(
LOG_DEBUG
,"
Processing attributes for realm '
$
userRealm
'
");
$sth
=
DBSelect
(
$config
->
{'
get_config_realm_id_query
'},
$
realmName
);
$sth
=
DBSelect
(
$config
->
{'
get_config_realm_id_query
'},
$
userRealm
);
if
(
!
$sth
)
{
if
(
!
$sth
)
{
$server
->
log
(
LOG_ERR
,"
Failed to get realm config attributes:
"
.
AWITPT::DB::DBLayer::
error
());
$server
->
log
(
LOG_ERR
,"
Failed to get realm config attributes:
"
.
AWITPT::DB::DBLayer::
error
());
return
MOD_RES_NACK
;
return
MOD_RES_NACK
;
...
@@ -224,6 +224,8 @@ sub getConfig
...
@@ -224,6 +224,8 @@ sub getConfig
processConfigAttribute
(
$server
,
$user
,
hashifyLCtoMC
(
$row
,
qw(Name Operator Value)
));
processConfigAttribute
(
$server
,
$user
,
hashifyLCtoMC
(
$row
,
qw(Name Operator Value)
));
}
}
DBFreeRes
(
$sth
);
DBFreeRes
(
$sth
);
$realmName
=
$userRealm
;
}
}
}
}
...
...
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