mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 09:03:40 +02:00
2017-01-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'lib/rduser.cpp' that caused the 'RDUser::groupAuthorized()' to return false positive results.
This commit is contained in:
@@ -390,9 +390,9 @@ bool RDUser::groupAuthorized(const QString &group_name)
|
||||
RDSqlQuery *q;
|
||||
bool ret=false;
|
||||
|
||||
sql=QString().
|
||||
sprintf("select GROUP_NAME from USER_PERMS where USER_NAME=\"%s\"",
|
||||
(const char *)RDEscapeString(user_name));
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"(USER_NAME=\""+RDEscapeString(user_name)+"\")&&"+
|
||||
"(GROUP_NAME=\""+RDEscapeString(group_name)+"\")";
|
||||
q=new RDSqlQuery(sql);
|
||||
ret=q->first();
|
||||
delete q;
|
||||
|
Reference in New Issue
Block a user