You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#100189 Upload Failed: No data

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by n3t on Monday, 10 June 2019 23:34 BST

n3t
Hi,

I am not able to upload some ZIP files using JCE Media manager. After checking everything, I found, that this is "security feature" of Joomla.
JFilterInput::isSafeFile scans raw contents of ZIP files (and other archives) for keywords like "PHP". From the code I guess that this check could be skipped when calling isSafeFile. Could JCE have option in profile to skip such check (Something like "Allow potentional dangerous files upload")?

You can check discussion around this here (last post).

Thanks for consideration

Pavel

Ryan
After checking everything, I found, that this is "security feature" of Joomla.
JFilterInput::isSafeFile scans raw contents of ZIP files (and other archives) for keywords like "PHP". From the code I guess that this check could be skipped when calling isSafeFile. Could JCE have option in profile to skip such check (Something like "Allow potentional dangerous files upload


JCE doesn't use JFilterInput::isSafeFile when uploading files, but has it's own methods for checking file validity.

What error are you getting when you attempt to upload a file?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

n3t
Hi,

as written in subject "Upload Failed: No data".

Joomla issue is fixed to JInputFilter, so if JCE uses $jinput->files->get('jform') or some similar construction, it is affected. Solution is to use
$files = $jinput->files->get('jform', array(), 'raw'); (as you can see in the link I sent).

When I tried to switch off Mime Type check and renamed the zip to pdf, upload worked correctly.

I can provide you example zip, but its quite large, aprox 5MB, so cannot post it here...

Pavel

Ryan
Does the zip file contain php files, or files containing php content?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

n3t
No, just JPEG images.

n3t
I created small test file, find it attached. It is not perfect case, as I had to use .pl in one of filename. In my real zip file, there are just jpgs, but because of zip compression somewhere in the file is ".pl" sequence, which is considered as dangerous.

Upload fails because JInputFilter returns false on line 724 (Joomla 3.9.6). It checks contents of zip file (without unzipping, just raw data) for suspicious extensions.

Attachments

testphp.zip

Ryan
Please try JCE Pro 2.7.14 RC5 - https://www.joomlacontenteditor.net/downloads/editor/pro/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

n3t
All my test files uploaded succesfully. Thanks a lot.

Pavel