View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
09415 | Bug reports | Survey taking | public | 2014-12-17 11:44 | 2014-12-29 15:33 |
Reporter | DenisChenu | Assigned To | aesteban | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.05+ | ||||
Summary | 09415: Invalid url for image broke Print to PDF with debug 2 | ||||
Description | With a survey with invalid image link : you have a PHP warning when try to print in PDF for user (maybe for admin too) | ||||
Steps To Reproduce | Create a survey with an invalid url for image src, try to print with debug 2 (lss included) | ||||
Additional Information | Maybe same if image url is not an image : to be tested (404 error and filetype) | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 141217 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | not relevant | ||||
Database type & version | not relevant | ||||
Server OS (if known) | not relevant | ||||
Webserver software & version (if known) | not relevant | ||||
PHP Version | PHP Version 5.4.4 | ||||
@aesteban : we have to filter too (HTML or not ?) survey title : because sometimes, some user add |
|
@DenisChenu: I took a look at this bug. We can fix it if we initialize $tcpdf['base_url'] to a non empty value in config/tcpdf.php but an exception is thrown in /var/www/limesurvey/application/third_party/tcpdf/tcpdf.php(2933) because the image doesn't exist (tcpdf is configured to throw exceptions). In fact, I think K_PATH_URL is useless for LimeSurvey. K_PATH_URL is usefull only if the survey creator write an image whose path contains http://yourhost.com/limesurvey/application/third_party/tcpdf/ and the only advantage is that tcpdf take image from file system instead of using curl. So, in my opinion, we could initialize $tcpdf['base_url'] = 'dummy' or just do nothing. What do you think Denis? |
|
@DenisChenu: I have reproduced the "strpos(): Empty needle" with found images so I think I will initialize $tcpdf['base_url'] = 'dummy'. Retarding survey title, I think HTML is better than plain text. |
|
I let you go for title HTML ;) For the image : it can be great if image is taken from system (if able), but deactivate it : why not :) |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14775 |
|
Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=14777 |
|
And I filtered survey title: https://github.com/LimeSurvey/LimeSurvey/commit/d00c9499705ee58a3b779ffcbecc95eb2c47a7bf |
|
Thanks |
|
Version 2.05 Build 141229 released |
|
LimeSurvey: master 1a68b626 2014-12-19 18:51 Details Diff |
Fixed issue 09415: Invalid url for image broke Print to PDF with debug 2 |
Affected Issues 09415 |
|
mod - application/config/tcpdf.php | Diff File | ||
LimeSurvey: 2.06 05d10351 2014-12-19 18:51 Details Diff |
Fixed issue 09415: Invalid url for image broke Print to PDF with debug 2 |
Affected Issues 09415 |
|
mod - application/config/tcpdf.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-17 11:44 | DenisChenu | New Issue | |
2014-12-17 11:44 | DenisChenu | Status | new => assigned |
2014-12-17 11:44 | DenisChenu | Assigned To | => aesteban |
2014-12-17 11:44 | DenisChenu | File Added: limesurvey_survey_pdfInvalidImage.lss | |
2014-12-17 11:45 | DenisChenu | Note Added: 31283 | |
2014-12-18 23:44 | aesteban | Note Added: 31301 | |
2014-12-19 00:23 | aesteban | Issue Monitored: aesteban | |
2014-12-19 01:37 | aesteban | Note Added: 31305 | |
2014-12-19 08:28 | DenisChenu | Note Added: 31306 | |
2014-12-19 18:55 | aesteban | Changeset attached | => LimeSurvey master 1a68b626 |
2014-12-19 18:55 | aesteban | Note Added: 31318 | |
2014-12-19 18:55 | aesteban | Resolution | open => fixed |
2014-12-19 18:57 | aesteban | Status | assigned => resolved |
2014-12-19 18:59 | aesteban | Changeset attached | => LimeSurvey 2.06 05d10351 |
2014-12-19 18:59 | aesteban | Note Added: 31319 | |
2014-12-19 20:27 | aesteban | Note Added: 31320 | |
2014-12-20 11:38 | DenisChenu | Note Added: 31324 | |
2014-12-29 15:33 | c_schmitz | Note Added: 31370 | |
2014-12-29 15:33 | c_schmitz | Status | resolved => closed |
2021-08-03 11:51 | guest | Bug heat | 6 => 8 |