View Issue Details

This issue affects 1 person(s).
 256
IDProjectCategoryView StatusLast Update
04963Bug reportsSecuritypublic2011-03-10 12:28
Reporterlimech Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.91RC4 
Fixed in Version1.91RC5 
Summary04963: SuperAdmin cannot set group permissions on surveys owned by others
Description

Because of what I understand as a lapsus i admin/html.php, an attempt from a SuperAdmin to set survey group permissions on a survey not owned by him results in a crash due to an incomplete SQL statement.

Additional Information

Suggested patch enclosed.

TagsNo tags attached.
Attached Files
postusergroupid.patch (639 bytes)   
Index: admin/html.php
===================================================================
--- admin/html.php	(revision 9809)
+++ admin/html.php	(working copy)
@@ -1891,7 +1891,11 @@
         }
     }
     else{
-        $sQuery = "SELECT owner_id FROM ".db_table_name('surveys')." WHERE sid = {$surveyid} AND owner_id = ".$_SESSION['loginID'];
+        $sQuery = "SELECT owner_id FROM ".db_table_name('surveys')." WHERE sid = {$surveyid} ";
+        if ($_SESSION['USER_RIGHT_SUPERADMIN'] != 1)
+        {
+            $sQuery.=" AND owner_id = ".$_SESSION['loginID'];
+        }
         $iOwnerID=$connect->GetOne($sQuery);
     }
     
postusergroupid.patch (639 bytes)   
Bug heat256
Complete LimeSurvey version number (& build)9809
I will donate to the project if issue is resolvedNo
Browserany
Database type & versionany
Server OS (if known)any
Webserver software & version (if known)any
PHP Versionany
Git branch / Pull Request URL

Users monitoring this issue

limech

Activities

Issue History

Date Modified Username Field Change
2011-02-18 16:07 limech New Issue
2011-02-18 16:07 limech File Added: postusergroupid.patch
2011-02-18 16:08 limech Issue Monitored: limech
2011-02-19 13:29 DenisChenu Assigned To => DenisChenu
2011-02-19 13:29 DenisChenu Status new => assigned
2011-02-23 16:08 DenisChenu Note Added: 14270
2011-02-23 16:08 DenisChenu Status assigned => resolved
2011-02-23 16:08 DenisChenu Fixed in Version => 1.91RC5
2011-02-23 16:08 DenisChenu Resolution open => fixed
2011-03-10 12:28 c_schmitz Note Added: 14387
2011-03-10 12:28 c_schmitz Status resolved => closed
2021-08-12 02:58 guest Bug heat 254 => 256