mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
The minimal patch for CORE-1604 (Error at database creation by user with non-ascii name) and CORE-3243 (CURRENT_USER and MON$USER don't work properly) that seems to work for the trusted authentication, but [at least] the legacy auth module has to be reviewed as it seems to deal with the user name "as is", without checking whether it arrived in UTF8 or not.
This commit is contained in:
parent
931bf2ad90
commit
dbe76bc342
@ -6667,6 +6667,8 @@ static void getUserInfo(UserId& user, const DatabaseOptions& options, const RefP
|
||||
PathName secureDb;
|
||||
if (auth.getInfo(&name, NULL, &secureDb))
|
||||
{
|
||||
ISC_systemToUtf8(name);
|
||||
|
||||
if (secureDb.hasData())
|
||||
{
|
||||
if (config && (secureDb != (*config)->getSecurityDatabase()))
|
||||
@ -6677,7 +6679,8 @@ static void getUserInfo(UserId& user, const DatabaseOptions& options, const RefP
|
||||
else
|
||||
{
|
||||
auth.moveNext();
|
||||
auth.getInfo(&trusted_role, NULL, NULL);
|
||||
if (auth.getInfo(&trusted_role, NULL, NULL))
|
||||
ISC_systemToUtf8(trusted_role);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6691,10 +6694,13 @@ static void getUserInfo(UserId& user, const DatabaseOptions& options, const RefP
|
||||
}
|
||||
}
|
||||
|
||||
ISC_utf8ToSystem(name);
|
||||
name.upper();
|
||||
ISC_systemToUtf8(name);
|
||||
|
||||
// if the name from the user database is defined as SYSDBA,
|
||||
// we define that user id as having system privileges
|
||||
|
||||
name.upper();
|
||||
if (name == SYSDBA_USER_NAME)
|
||||
{
|
||||
wheel = true;
|
||||
|
Loading…
Reference in New Issue
Block a user