Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
smradius
smradius
Commits
196bb8f5
Commit
196bb8f5
authored
Oct 08, 2016
by
Nigel Kukard
Browse files
BUGFIX: Fixed incorrect realm name displaying when using the <DEFAULT> realm
parent
f396ee22
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/smradius/modules/system/mod_config_sql.pm
View file @
196bb8f5
...
...
@@ -198,11 +198,11 @@ sub getConfig
# Extract realm from username
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
)
{
$server
->
log
(
LOG_ERR
,"
Failed to get realm config attributes:
"
.
AWITPT::DB::DBLayer::
error
());
return
MOD_RES_NACK
;
...
...
@@ -224,6 +224,8 @@ sub getConfig
processConfigAttribute
(
$server
,
$user
,
hashifyLCtoMC
(
$row
,
qw(Name Operator Value)
));
}
DBFreeRes
(
$sth
);
$realmName
=
$userRealm
;
}
}
...
...
Write
Preview
Supports
Markdown
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