Osticket: 1.9.12 File upload error undefined400 with Google Chrome

Created on 15 Dec 2015  路  16Comments  路  Source: osTicket/osTicket

Recently I am getting a lot of complaints regarding users of Google Chrome when trying to upload files. The error that comes up is File upload error 'undefined400'. When I try the same file (A small PDF document as an example) in Internet Explorer 11 it uploads virtually straight away without the same issue.

Now it gets even more strange I tried an older version of Chrome on a colleagues machine and it worked without the undefined400 message, then I updated their Chrome and straight away 'undefined400'

My Chrome version is Version 47.0.2526.80 m (64-bit)

osTicket 1.9.12 is running on Windows Server 2008 R2 IIS7 with PHP 5.3.28 (I did try updating PHP but to no effect, still the same issue).

Attachments cause unknown

Most helpful comment

I was facing same error message using nginx.

added the following part to osticket.conf for nginx and solved the problem

if ($request_uri ~ "^/.*.php(/[^\?]+)") {
set $path_info $1;
}

All 16 comments

The 400 part represents the HTTP status from the backend. It should mean a poorly formatted request, oversize file, or file type not allowed. Could you send the response from the server (perhaps via the Chrome developer tools)?

I'm experiencing the same issue and here are the console errors from the developer tools in Chrome:

image

osTicket (v1.9.12)
Google Chrome Version 47.0.2526.106 m

@jwheel12 can you post the text response from the server?

@greezybacon I'm unsure how to do that.

Usually in Chrome, you can click on the link (.../form/upload/attach) in the dialog you snapped. It should take you to a detailed view of the request including the request and response headers. There should also be a tab for the response body as text or a preview. Any information from those sections would be helpful in identifying what is happening on your end

Request URL:http://trackit/supportdesk/ajax.php/form/upload/34
Request Method:POST
Status Code:400 Bad Request
Remote Address:10.201.98.9:80
Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Length:23
Content-Type:text/html; charset=UTF-8
Date:Wed, 06 Jan 2016 12:02:07 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Persistent-Auth:false
Pragma:no-cache
Server:Microsoft-IIS/7.5
WWW-Authenticate:Negotiate oYG2MIGzoAMKAQChCwYJKoZIgvcSAQICooGeBIGbYIGYBgkqhkiG9xIBAgICAG+BiDCBhaADAgEFoQMCAQ+ieTB3oAMCARKicARuDCrg6EX2Tgy+v8W/3ObK+fTNvuTaCZmZ3wJOKxz+TSSqF3PNCWer7bY19byMhvgeyvo5J7tAzIN5U8BOxY7vSE/zNAs2/JgcY5PHyLBVAomSwmGEtxBhc5gIRl39hUwAZXzXJ0Ggl+fSR0J8+ew=
X-Powered-By:ASP.NET
X-Powered-By:PHP/5.3.28
Request Headers
view source
Accept:_/_
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Authorization:Negotiate YIIHVQYGKwYBBQUCoIIHSTCCB0WgMDAuBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICHgYKKwYBBAGCNwICCqKCBw8EggcLYIIHBwYJKoZIhvcSAQICAQBuggb2MIIG8qADAgEFoQMCAQ6iBwMFACAAAACjggWAYYIFfDCCBXigAwIBBaEPGw1TSElQTEVZLkFDLlVLoigwJqADAgECoR8wHRsESFRUUBsVdHJhY2tpdC5zaGlwbGV5LmFjLnVro4IFNDCCBTCgAwIBEqEDAgEyooIFIgSCBR6O81riS5GrBAfU/uwrlcYgY81blQqL/RFyabS/OWX760ic6SmWqE/PU+M3s5JYiYpumFn+65VwDNlCrv+VIUMSoBaxqph4J8TFyd3DpghfagIwtGw9EBJu2KkyzoBxPgwdi7nn3RPsiLIZphlYcfoUoK0ocSz/bQf9Xnv+JKnaxR8dB2/fvpKKUH/1gndgdje224Amb2z5sb+T3u+ThBeR/jgSyxoszd5PCCGRa2hPFUoAbIanVRbLKFuu1DcCyAl2AAVKPFT44qX439Ut/4SPOMrcrgdF1u9dkRQMpB36nUiqwMZIADOJhznF8ceYKuPEPcBIErpswxYRvdQNDs1YhxkH3K0XNST04hdlRE7ajeXh1rfv+tkBOF2ve97ef4GChuY1Vcdx01Uco0JkLor6tCNwzNvE54IUpXBBxKYP/fud3lAImGYO720SrZVBPwXonmNIG8SQT+eNchfIVfukdjbko+URFjKLjXDLMomDsOhvTXwzILyRz1FxZ3U97ihv3sQB3ftQyLsJYVm/IXj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T5aTr43WGhEjPtjcwhasXJL5n2fT8NF7mn1ahwXbW6L3dnX9eDoNe5KMMGlk1Z9iDQ5EVEDNsmBvAO6n4e3u3hsmreeIV8e2x6A1vsbv8p4ngKf9XmusNEJP8GKSCAVcwggFToAMCARKiggFKBIIBRqr9j8n03Nu53nO9MwQeI5VPDW04GIaE+I+6+Ri54cT+Br79l58PMbtm5aYpI6sdYnnfVtDMmT1vD2i2Y97AI+H22jRy5++eoSyKV6otCSycohZ9HqYMrDLOacp6aQrvOf8Pfuz7yPKUIYaVksqP0gDqwNw4UzAtggwIdQAs15owRKcZwdC1QiCApXD8byU/f1HW6d9zhJyqwsNXBwQWUqWoRbu40WMAetsBykcYsQN72YZamzL8deQg64TW1IF43wB6AV4iP8B1b0DpdxGJWZJU6fnQE9cW0GbyjAi4Hh3jcdFWECTvWx+kRTHmDMKgfRlVChrbDpEKipu658P3kWpefFQ6g95dcibal0JxTBQK3QmtwvCnlz4YJUS8QitdjvCsz04mt/iEGfHlGEg5dgAkelVL3X4I4/gl4xAPHMElwG8/k8Z3
Connection:keep-alive
Content-Length:707866
content-type:multipart/form-data; boundary=------multipartformboundary1452081727134
Cookie:OSTSESSID=hu2t60h0nuhivcd5eukj6deep5
Host:trackit
Origin:http://trackit
Referer:http://trackit/supportdesk/open.php
User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
X-Requested-With:XMLHttpRequest

Response is : Send one file at a time

Hope this helps

Also in open.php xhr.send(builder); got highlighted for some reason when I clicked something but not sure is this is related to the issue or not.

I have the exact same problem. Most of our Chrome users are reporting that they suddenly can no longer upload files in Chrome. However, I am running osticket 1.9.11 on Server 2008R2, IIS7.5. I have also tested this with the latest RC of 1.10 with the same results. Firefox, Safari, and IE are unaffected.

The Text Response for that attach operation is just: "Send one file at a time"
The response headers from the Chrome Inspect Element view for this attach operation:

HTTP/1.1 400 Bad Request
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 23
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: PHP/5.6.0
Set-Cookie: OSTSESSID=0j1lhpu6hjisf1kaceaegvh8e6; expires=Thu, 07-Jan-2016 15:48:56 GMT; Max-Age=86350; path=/; domain=helpdesk
Persistent-Auth: false
X-Powered-By: ASP.NET
WWW-Authenticate: Negotiate oYG2MIGzoAMKAQChCwYJKoZIgvcSAQICooGeBIGbYIGYBgkqhkiG9xIBAgICAG+BiDCBhaADAgEFoQMCAQ+ieTB3oAMCARKicARuh9SHdv0HqPPFQuKJ/ZspdSUAWx1cO3VgjB2z9stLqvB3jvTdcjC5R9LPOusk4nFp49Kmku69uRfJaf3YyTlRB3FbP+dIUVYdDpngRtLEbbDZgTjQI+bTqyzDRZgwefMs/DDLxdUf9maLw4WMM7U=
Date: Wed, 06 Jan 2016 15:49:46 GMT
Connection: close

The request headers:

POST /scp/ajax.php/form/upload/attach HTTP/1.1
Host: helpdesk
Connection: keep-alive
Content-Length: 120470
Authorization: Negotiate YIIOHQYGKwYBBQUCoIIOETCCDg2gMDAuBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICHgYKKwYBBAGCNwICCqKCDdcEgg3TYIINzwYJKoZIhvcSAQICAQBugg2+MIINuqADAgEFoQMCAQ6iBwMFACAAAACjggxOYYIMSjCCDEagAwIBBaEMGwpNQy5VS1kuRURVoicwJaADAgECoR4wHBsESFRUUBsUcHJkY3Bod3MxLm1jLnVreS5lZHWjggwGMIIMAqADAgESoQMCAQaiggv0BIIL8Gjj7bVofbID7jPBNql+X6HA4WA6/L1QWn7XyiielJdLCFHAeaNweeYwhV65kH8INFNLevFW4arUXraM4Wg3T4BXPjr6J1svAjeFiTXQY5sWkhV7xTbVJ+DMnp3ci2Q6OGZHuLd3ol3pAkM9lfTIpD0zirTv6loUXD3Mdz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Px+crSp7AH7WSZytg7w26bWs1r70w=
Origin: http://helpdesk
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
content-type: multipart/form-data; boundary=------multipartformboundary1452094914429
Accept: */*
Referer: http://helpdesk/scp/tickets.php?id=6240
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: __utma=44521701.816203928.1415654462.1418652656.1418668361.12; __utma=114299931.816203928.1415654462.1433265854.1433265854.1; __utma=43166241.816203928.1415654462.1441289049.1444140990.11; __utmz=43166241.1444140990.11.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); AMCV_774C31DD5342CAF40A490D44%40AdobeOrg=793872103%7CMCIDTS%7C16725%7CMCMID%7C46140873415794192773181877669542201920%7CMCAAMLH-1445620433%7C7%7CMCAAMB-1445620434%7CNRX38WO0n5BH8Th-nqAG_A%7CMCAID%7C2B10982705078697-40000107A001292E; s_fid=3EF5D888E3167B3A-2F0E736D25473DBD; _ga=GA1.2.816203928.1415654462; __unam=730c264-14abb27af44-2db8bdff-59; SESS455fa24d46601a50c55b1e4d094fa904=3JhuaS7WQBbh6FRUC_GJDP1zfoBu3xXIjIEPy2XJxME; OSTSESSID=0j1lhpu6hjisf1kaceaegvh8e6

I have just installed the latest Google Chrome beta (Version 48.0.2564.71 beta-m (64-bit)) which seems to resolve the issue. Could someone else try and post their results?

It would be easier if an osTicket fix could be found however as I find pushing out Chrome updates to all our PC estate can be a little flaky at the best of times!

I just downloaded the Chrome Beta as well and tested file uploads. Everything is working as it should with this beta version. I'm running Version 48.0.2564.71 beta-m (64-bit).

Thanks for the update, jround! I can't push the Chrome update since it is unreliable, but I will hold out hope that the next update or two for Chrome will fix the issue.

I have the exact same problem with Chrome 48.0.2564.79 beta-m (64-bit) and FF 45

IE give me same error

I was facing same error message using nginx.

added the following part to osticket.conf for nginx and solved the problem

if ($request_uri ~ "^/.*.php(/[^\?]+)") {
set $path_info $1;
}

Same problem here, using Apache 2.4.23 (cPanel version) with PHP 5.4.45 (PHP-FPM via socket, cgi-fcgi using mod_proxy_fcgi).

To enable PATH_INFO with Apache 2.4 using FastCGI to connect to PHP-FPM sock, I have to set the EnvVar proxy-fcgi-pathinfo.

On the VHost, into the IfModule mod_proxy_fcgi.c, I put the SetEnvIf for the support subdir (where I have the osTicket):

SetEnvIf Request_URI "support/.*" proxy-fcgi-pathinfo=1

The test URL is like: test.com/support/setup/test.php/asd/
The problem is, if I have PATH_INFO unset, the PHP_SELF variable is correctly set: /support/setup/test.php/asd/ and PATH_INFO empty.

And, when I have PATH_INFO set (with the SetEnvIf on the httpd.conf VHost), the PATH_INFO is correctly set: /asd/ , but, the PHP_SELF is broken: /home/testcom/public_html//support/setup/test.php/asd/

And the expected result has to be like this:
PHP_SELF: /support/setup/test.php/asd/
PATH_INFO: /asd/

Anyone are running the same environment and has the same problem?

I've made this workaround for the get_path_info function, based on this solution for another framework made by @nadavkav https://github.com/simplesamlphp/simplesamlphp/issues/5#issuecomment-135205300

if (preg_match("/^(.+\/.*\.php)(\?)?(\/.+)$/", $_SERVER['REQUEST_URI'], $possible_pathinfo)) {
    $pathinfo = $possible_pathinfo[3];

    if (preg_match("/(.*)\?(.*)/", $pathinfo)) {
        $pathinfo = substr($pathinfo, 0, strripos($pathinfo, "?"));
    }

    return $pathinfo;
}

You have to put it on the include/class.osticket.php file, behind this:

        if(isset($_SERVER['ORIG_PATH_INFO']))
            return $_SERVER['ORIG_PATH_INFO'];

        //TODO: conruct possible path info.

@komodin , thanks! very interesting. I will check it out.
@AviMoto, I think this will be interesting to you too.

Was this page helpful?
0 / 5 - 0 ratings