View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
14125Bug reportsInstallationpublic2019-04-30 09:10
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.14.x 
Fixed in Version3.14.x 
Summary14125: DB user with insufficient right can show white page when installing
Description

With IIS + SQL server : if user have insufficient right (READ/WRITE role, not db_owner) : this broke with a 500 error without any information.

Steps To Reproduce

With mysql/apache : it's better show a 500 with the DB error. Need hacking index.php for IIS

Then with mysql
create "test" DB
create "read' user
GRANT SELECT , INSERT , UPDATE , DELETE , ALTER ON test . * TO 'read'@'localhost';

Launch new install

TagsNo tags attached.
Attached Files
index.php.html (1,661 bytes)   
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>CDbCommand
 failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or 
access violation: 1142 CREATE command denied to user 
'sp-read'@'localhost' for table 'lime_answers' #0 
/home/sondages.pro/htdocs/wordpress/limesurvey/framework/db/CDbCommand.php(1352):
 CDbCommand-&gt;execute()
#1 
/home/sondages.pro/htdocs/wordpress/limesurvey/installer/create-database.php(36):
 CDbCommand-&gt;createTable('{{answers}}', Array)
#2 
/home/sondages.pro/htdocs/wordpress/limesurvey/application/controllers/InstallerController.php(911):
 createDatabase(Object(DbConnection))
#3 
/home/sondages.pro/htdocs/wordpress/limesurvey/application/controllers/InstallerController.php(513):
 InstallerController-&gt;_setup_tables('/home/sondages....')
#4 
/home/sondages.pro/htdocs/wordpress/limesurvey/application/controllers/InstallerController.php(83):
 InstallerController-&gt;stepPopulateDb()
#5 
/home/sondages.pro/htdocs/wordpress/limesurvey/framework/web/CWebApplication.php(282):
 InstallerController-&gt;run('populatedb')
#6 
/home/sondages.pro/htdocs/wordpress/limesurvey/framework/web/CWebApplication.php(141):
 CWebApplication-&gt;runController('installer/popul...')
#7 
/home/sondages.pro/htdocs/wordpress/limesurvey/framework/base/CApplication.php(185):
 CWebApplication-&gt;processRequest()
#8 /home/sondages.pro/htdocs/wordpress/limesurvey/index.php(194): 
CApplication-&gt;run()
#9 {main}<div class="alertify-notifier ajs-bottom ajs-right"></div><div class="alertify"><iframe class="ajs-footer" src="index.php_fichiers/alerts.html"></iframe></div></body></html>
index.php.html (1,661 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)3.14.11 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionmysql + mssql (+ surely pgsql with invalid rights)
Server OS (if known)windows (and linux)
Webserver software & version (if known)IIS (but reproductible in apache)
PHP Versionnot releavant (tested in 7.2, reproduce in 5.6)

Users monitoring this issue

There are no users monitoring this issue.

Activities

user70560

2018-10-03 08:18

  ~49223

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=28212

Related Changesets

LimeSurvey: master 91a5cef6

2018-10-03 08:18:48

user70560


Committer: GitHub Details Diff
Fixed issue 14125: DB user with insufficient right can show white page when installing (#1133)

Dev: fix double encoding of arrays of errors
Dev: trace is really not needed (Yii part)
Dev: didn't test with command install : create-database throw CHttpException (didn't update it)
Affected Issues
14125
mod - application/controllers/InstallerController.php Diff File
mod - application/views/installer/dbconfig_view.php Diff File
mod - installer/create-database.php Diff File

Issue History

Date Modified Username Field Change
2018-10-02 17:31 DenisChenu New Issue
2018-10-02 17:31 DenisChenu Status new => assigned
2018-10-02 17:31 DenisChenu Assigned To => DenisChenu
2018-10-02 17:31 DenisChenu File Added: index.php.html
2018-10-03 08:18 user70560 Changeset attached => LimeSurvey master 91a5cef6
2018-10-03 08:18 user70560 Note Added: 49223
2018-10-03 08:18 user70560 Assigned To DenisChenu => user70560
2018-10-03 08:18 user70560 Resolution open => fixed
2018-10-03 08:19 DenisChenu Assigned To user70560 => DenisChenu
2018-10-03 08:19 DenisChenu Status assigned => resolved
2018-10-03 08:19 DenisChenu Fixed in Version => 3.14.x
2019-04-30 09:10 c_schmitz Status resolved => closed