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:
Fred Gleason
2017-01-13 19:03:22 -05:00
parent 7df68e7ffd
commit 21dcac3e4a
2 changed files with 6 additions and 3 deletions

View File

@@ -15507,3 +15507,6 @@
* Fixed a bug in 'rdlogedit/edit_log.cpp' that caused the Modified * Fixed a bug in 'rdlogedit/edit_log.cpp' that caused the Modified
datestamp to be updated when 'OK' was clicked even if no changes datestamp to be updated when 'OK' was clicked even if no changes
were made. were made.
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.

View File

@@ -390,9 +390,9 @@ bool RDUser::groupAuthorized(const QString &group_name)
RDSqlQuery *q; RDSqlQuery *q;
bool ret=false; bool ret=false;
sql=QString(). sql=QString("select GROUP_NAME from USER_PERMS where ")+
sprintf("select GROUP_NAME from USER_PERMS where USER_NAME=\"%s\"", "(USER_NAME=\""+RDEscapeString(user_name)+"\")&&"+
(const char *)RDEscapeString(user_name)); "(GROUP_NAME=\""+RDEscapeString(group_name)+"\")";
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
ret=q->first(); ret=q->first();
delete q; delete q;