View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14957Bug reportsSurvey takingpublic2019-11-27 17:46
ReporterLimuss Assigned Tocdorin  
PrioritynoneSeverityblock 
Status closedResolutionunable to reproduce 
Product Version3.17.x 
Summary14957: Error 400 appears randomly when i upload a file
Description

Hello everyone:

Sometimes when i test a survey using a upload file answer, appears (not always) a

400 error "Bad Request" "The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications."

I try to find, the cause of the problem, but when i see additional information in a developer console appears this error:

Microsoft Edge throws error: modaldialog.js (31,21) SCRIPT438: Object doesn't support property or method 'saveAndExit'

I put the code of a function openUpladModalDialog() modaldialog.js from here:

function openUploadModalDialog(){
$('.upload').click(function(e) {

    e.preventDefault();

    var $this = $(this);
    var show_title   = getQueryVariable('show_title', this.href);
    var show_comment = getQueryVariable('show_comment', this.href);
    var pos          = getQueryVariable('pos', this.href);
    var fieldname    = getQueryVariable('fieldname', this.href);
    var buttonsOpts = {};
    buttonsOpts[uploadLang.returnTxt] = function() {
        $(this).dialog("close");
    };

    $('#file-upload-modal-' + fieldname).appendTo('body').modal();
    $(document).on('shown.bs.modal','#file-upload-modal-' + fieldname, function()
    {
        updateMaxHeightModalbody($(this));
    });
    $('#file-upload-modal-' + fieldname).on('hide.bs.modal', function() {
        var pass;
        var uploaderId = 'uploader' + fieldname;
        if(document.getElementById(uploaderId).contentDocument) {
            if(document.getElementById(uploaderId).contentDocument.defaultView)
                {       /*Firefox*/
                pass=document.getElementById(uploaderId).contentDocument.defaultView.saveAndExit(fieldname,show_title,show_comment,pos);
            }else{       /*IE8*/
                pass=document.getElementById(uploaderId).contentWindow.saveAndExit(fieldname,show_title,show_comment,pos);
            }
        }else{    /*IE6*/
            pass=document.getElementById(uploaderId).contentWindow.saveAndExit(fieldname,show_title,show_comment,pos);
        }
        return pass;
    });
});

}

I use Limesurvey version 3.17.3+190429

Any advice will be well accepted.

Thanks for advance,

Steps To Reproduce

1.- Create a survey with a option "File upload"
2.- Activate this survey
3.- With url of this survey, copy this url in any web browser.
4.- Sometimes you will see this option works correctly, without problems, but sometimes you will see the next message (in my case this message is in Spanish):

400 error "Bad Request"
"The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications."

TagsNo tags attached.
Attached Files
Captura-errorlimesurvey.JPG (33,613 bytes)   
Captura-errorlimesurvey.JPG (33,613 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)3.17.3+190429
I will donate to the project if issue is resolvedNo
BrowserMicrosoft Edge 25.10586 and IE 11
Database type & version5.6.40
Server OS (if known)
Webserver software & version (if known)
PHP Version7.20

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-05-31 19:24

developer   ~52262

Can be due to session issue : https://github.com/LimeSurvey/LimeSurvey/blob/317344b6f3089a0078aac967d52671fe468f8654/application/controllers/UploaderController.php#L21-L24

  1. We must get survey inside session
  2. We must check is survey is OK.
DenisChenu

DenisChenu

2019-05-31 19:28

developer   ~52263

Last edited: 2019-05-31 19:29

Another reason :

  1. Try to hack server : https://github.com/LimeSurvey/LimeSurvey/blob/317344b6f3089a0078aac967d52671fe468f8654/application/controllers/UploaderController.php#L47-L50 or https://github.com/LimeSurvey/LimeSurvey/blob/317344b6f3089a0078aac967d52671fe468f8654/application/controllers/UploaderController.php#L52-L59
  2. File fu_xxx or futmp_xxxx not found in directory : strange it can happen during survey : except if you start another survey in another window …
  3. Current survey seems invalid : https://github.com/LimeSurvey/LimeSurvey/blob/317344b6f3089a0078aac967d52671fe468f8654/application/controllers/UploaderController.php#L125-L128

Please activate debug mode

cdorin

cdorin

2019-06-24 14:27

reporter   ~52502

Hello, could you please provide more info about your issue?

cdorin

cdorin

2019-08-08 17:23

reporter   ~53155

Hello @Limuss, could you please provide us more information? (activate the debug mode)

cdorin

cdorin

2019-11-27 17:46

reporter   ~54837

no more info provided - closed.

Issue History

Date Modified Username Field Change
2019-05-31 18:12 Limuss New Issue
2019-05-31 18:12 Limuss File Added: Captura-errorlimesurvey.JPG
2019-05-31 19:24 DenisChenu Note Added: 52262
2019-05-31 19:28 DenisChenu Note Added: 52263
2019-05-31 19:29 DenisChenu Note Edited: 52263
2019-06-24 14:27 cdorin Assigned To => cdorin
2019-06-24 14:27 cdorin Status new => feedback
2019-06-24 14:27 cdorin Note Added: 52502
2019-08-08 17:23 cdorin Note Added: 53155
2019-11-27 17:46 cdorin Status feedback => closed
2019-11-27 17:46 cdorin Resolution open => unable to reproduce
2019-11-27 17:46 cdorin Note Added: 54837