File extension disallowed

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
OSWorX
Posts: 24
Joined: Sat Jul 06, 2013 9:43 am

File extension disallowed

Post by OSWorX »

Currently (Hesk 2.8.4 - but is also in older versions) file extensions like .php are not allowed, because they are removed also after definition inside the file admin_settings_save.php

I know that such a file could be a security risk (.js also and this is allowed), but for a support site handling with scripts and files, php should be possible.

Checking for malicious code inside the php-files should be done at upload (client side, because staff should know what they are doing!) and refused if contain a security risk.

I am missing also a check for malicious code inside images - e.g. submit a file as doc, txt, etc. masked as .png or .jpg.
OSWorX - OpenSource Development :: OpenCart Developer
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: File extension disallowed

Post by Klemen »

Correct, some extensions are removed because they represent files that can be executed on a typical PHP-configured server (.js are typically client-side unless you run something like NodeJS on the server). It's an extra step to help keep Hesk secure.

If you want to accept PHP files, the smart thing would be to ask your users to compress them before uploading (zip, gz, rar, 7z ...).

Yes, images, text files, ... can contain hidden code. However, a properly configured server should not execute them. Also, reliable scanning files at upload is way out of the scope of Hesk design. There are much better tools for that that run server-side. For example, I use ConfigServer eXploit Scanner which also takes care of banning such users with the help of ModSecurity hooks.

client side, because staff should know what they are doing
You'd be surprised :lol:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply