View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05438Bug reportsSurvey editingpublic2011-10-20 15:35
ReporterTMSWhite Assigned Tomagiclko 
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00a1 
Summary05438: can't modify questions or help if they contain single quotes
Description

And sometimes embedded double quotes also cause problems.

Those fields don't have their quotes escaped prior to creation of the database insert string

Additional Information

Here is a sample error:

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't this fail?', gid='2', other='N', mandatory='N'WHERE sid='18577' AND qid='44' A' at line 1

UPDATE lime_questions SET type='Y', title='showAny', question='Do you want to display any of the questions on the next page? Will this "work?"', preg='', help='Won't this fail?', gid='2', other='N', mandatory='N'WHERE sid='18577' AND qid='44' AND language='en'

Filename: C:\xampp\htdocs\limesurvey_ci\system\database\DB_driver.php

Line Number: 330

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)10906
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5.3
Server OS (if known)Windows XP
Webserver software & version (if known)Apache 2
PHP Version5.2
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

magiclko

magiclko

2011-09-01 19:20

reporter   ~16189

TMSWhite: Can you check again?

TMSWhite

TMSWhite

2011-09-07 21:43

reporter   ~16247

I can now add the following string to everything except for questions:

Can't I add "double quotes"?

However, when I try to make any change to a Question (even just adding a space), I get this error message:

( ! ) Fatal error: Call to undefined method CI_DB_mysqli_result::Recordcount() in C:\xampp\htdocs\limesurvey_ci\application\controllers\admin\database.php on line 591

Call Stack

Time Memory Function Location

1 0.0008 362664 {main}( ) ..\index.php:0
2 0.0027 431160 require_once( 'C:\xampp\htdocs\limesurvey_ci\system\core\CodeIgniter.php' ) ..\index.php:163
3 0.1880 8358176 call_user_func_array ( ) ..\CodeIgniter.php:339
4 0.1880 8358224 Database->index( ) ..\CodeIgniter.php:339

TMSWhite

TMSWhite

2011-09-15 16:02

reporter   ~16280

OK, it's working as of revision 10991

Issue History

Date Modified Username Field Change
2011-08-31 16:46 TMSWhite New Issue
2011-09-01 18:46 c_schmitz Assigned To => magiclko
2011-09-01 18:46 c_schmitz Status new => assigned
2011-09-01 19:20 magiclko Note Added: 16189
2011-09-07 11:11 magiclko Status assigned => feedback
2011-09-07 21:43 TMSWhite Note Added: 16247
2011-09-07 21:43 TMSWhite Status feedback => assigned
2011-09-15 16:02 TMSWhite Note Added: 16280
2011-10-20 15:35 magiclko Status assigned => closed
2011-10-20 15:35 magiclko Resolution open => fixed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing