Commit 196bb8f5 authored by Nigel Kukard's avatar Nigel Kukard

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

parent f396ee22
...@@ -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;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment