View Issue Details

IDProjectCategoryView StatusLast Update
16733Bug reportsTheme editorpublic2020-11-16 17:23
Reportergabrieljenik Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status feedbackResolutionreopened 
Product Version3.24.0 
Summary16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error
Description

When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error
Instead of getting a "File to Big error", we got a CRSF token error. Very missleading

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.24.0
I will donate to the project if issue is resolvedNo
Sync to Zoho Project
Browser
Database & DB-VersionMysql
Server OS (if known)
Webserver software & version (if known)
PHP Version7

Relationships

related to 16834 assignedgabrieljenik When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error 

Activities

DenisChenu

DenisChenu

2020-10-13 11:40

developer   ~60169

We have some checker in Upload Question tye : maybe we can create an helper or an extension ?

gabrieljenik

gabrieljenik

2020-10-13 16:45

developer   ~60174

Sure, that's good idea.

DenisChenu

DenisChenu

2020-10-13 16:57

developer   ~60175

If you found time ;)

gabrieljenik

gabrieljenik

2020-10-16 16:19

developer   ~60233

I think this is failing as well on the Token CSV import

DenisChenu

DenisChenu

2020-10-16 16:47

developer   ~60234

I think it's failling as well onn VVimport :)

gabrieljenik

gabrieljenik

2020-10-23 14:56

developer   ~60390

Fix applied to:

Theme import (Themes list and Theme editor)
File upload in Theme editor (uploading files to a theme)
Image upload (in global theme options)
Image upload (in survey theme options
There are other places where this should be applied. I have some already fixed. Want to review these first.

These are fixed and pendign to be applied:

CPDB (Import CSV)
Labelset import
Token import
Question import (had to add 'action' and 'sid' to the URL)
These are pending to be fixed:

UploaderController
questiongroups
surveyadmin - Import survey - Need to split the method (used for copy and import), or move the 'action' to the URL.
frontend_helper, checkUploadedFileValidity ?
dataentry - Import VV file (need to split the method or assume an upload action when the request is POST)

https://github.com/LimeSurvey/LimeSurvey/pull/1633

See comments on github.

gabrieljenik

gabrieljenik

2020-11-10 10:41

developer   ~60598

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=30710

lime_release_bot

lime_release_bot

2020-11-16 09:31

administrator   ~60649

Fixed in Release 3.25.0+201117

gabrieljenik

gabrieljenik

2020-11-16 17:17

developer   ~60670

Reopening for applying the patch on the other uploads, now that the main part has been merged

gabrieljenik

gabrieljenik

2020-11-16 17:21

developer   ~60671

Now applying the patch to:

  • CPDB (Import CSV)
  • Labelset import
  • Token import
  • Question import (had to add 'action' and 'sid' to the URL)

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1658

We should port this to LS4 after. Right?

Related Changesets

LimeSurvey: 3.x-LTS eef20220

2020-11-10 10:41:45

gabrieljenik


Committer: GitHub Details Diff
Bug/16733 when importing a theme bigger in size than the allowed php.ini settings, there is no proper description of the error (#1633)

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Adding helper functions for checking uploads filesize

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Applying fix on
- Theme import (Themes list and Theme editor)
- File upload in Theme editor (uploading files to a theme)
- Image upload (in global theme options)
- Image upload (in survey theme options

* Fixed issue 16733: When importing a theme bigger in size than the allowed PHP.ini settings, there is no proper description of the error

Creating Uploadhelper and moving helper functions to class methods.
Affected Issues
16733
mod - application/controllers/admin/surveyadmin.php Diff File
mod - application/controllers/admin/themes.php Diff File
add - application/core/LSUploadHelper.php Diff File
mod - application/views/admin/themeoptions/import_modal.php Diff File
mod - application/views/admin/themeoptions/update.php Diff File
mod - application/views/admin/themes/importform_view.php Diff File
mod - themes/survey/bootswatch/options/options.twig Diff File
mod - themes/survey/fruity/options/options.twig Diff File
mod - themes/survey/vanilla/options/options.twig Diff File

Issue History

Date Modified Username Field Change
2020-10-13 01:49 gabrieljenik New Issue
2020-10-13 11:40 DenisChenu Note Added: 60169
2020-10-13 16:45 gabrieljenik Note Added: 60174
2020-10-13 16:57 DenisChenu Note Added: 60175
2020-10-13 17:01 cdorin Assigned To => gabrieljenik
2020-10-13 17:01 cdorin Status new => assigned
2020-10-16 16:19 gabrieljenik Note Added: 60233
2020-10-16 16:47 DenisChenu Note Added: 60234
2020-10-23 14:56 gabrieljenik Note Added: 60390
2020-11-10 10:41 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS eef20220
2020-11-10 10:41 gabrieljenik Note Added: 60598
2020-11-10 10:41 gabrieljenik Resolution open => fixed
2020-11-16 09:31 lime_release_bot Note Added: 60649
2020-11-16 09:31 lime_release_bot Status assigned => closed
2020-11-16 17:17 gabrieljenik Status closed => feedback
2020-11-16 17:17 gabrieljenik Resolution fixed => reopened
2020-11-16 17:17 gabrieljenik Note Added: 60670
2020-11-16 17:21 gabrieljenik Note Added: 60671
2020-11-16 17:23 gabrieljenik Issue cloned: 16834
2020-11-16 17:23 gabrieljenik Relationship added related to 16834