Skip to content
Snippets Groups Projects
Commit 196bb8f5 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

BUGFIX: Fixed incorrect realm name displaying when using the <DEFAULT> realm

parent f396ee22
No related branches found
No related tags found
1 merge request!422Fixes for default '<DEFUALT>' and blank '' realms
...@@ -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;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment