tridentli / trident

Trident is a trusted and secure communication platform for enabling better communication between groups of trusted parties
https://trident.li
Apache License 2.0
20 stars 9 forks source link

Error uploading files with 4 character extension #100

Open stewrg opened 7 years ago

stewrg commented 7 years ago

When trying to upload a Maltego diagram (which has a .mtgl file extension), I gat an upload error which says

"Add File Unsupported filetype Please contact us if this is unexpected."

But if I zip it with the same file name no problem. I assume that file extensions of 4 characters are not recognised. Please remover this restriction.

massar commented 7 years ago

The system actually does not limit on the length of the extension.

Your problem is that the filetype (read: mime type) is not known to our buildin list nor to the golang mimetype library, and that is why it rejects it.

Seems we really need to start resorting to libmagic and/or allowing any type of data to be uploaded. The latter would be a flag though that has to be enabled on the TG level.

bapril commented 6 years ago

Stew, what is the file-type that was attempted? We'll add a big batch of new mime-types, I want to make sure this is on the list.

Thanks Ben

stewrg commented 6 years ago

I am having problems with Maltego files - [filename].mtgl

and also

pgp encrypted excel files - [filename].xlsx.gpg

The workaround is to zip the files, and upload that.

Stew