Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript files detected as text/plain by default, immediately rejected #46

Open
andrewandante opened this issue Apr 23, 2021 · 0 comments

Comments

@andrewandante
Copy link

Have a situation where JS files are being uploaded into the CMS, every JS file I try is detected as text/plain by finfo, meaning it is rejected as not a valid mimetype.

PHP says this is "not a bug": https://bugs.php.net/bug.php?id=53035 because all finfo can tell is that it's text - unless it parses the content of the file - which is much more problematic.

Question is just to figure out what we want to do here - options I see are:

a) add 'text/plain' to the default list for .js files
b) investigate better ways to detect whether a .js file is genuinely javascript
c) add a list of common odd interactions to the Readme so that people immediately find it when searching
d) add a set of extensions (or way to add a list of extensions) that are excluded from validation (if that exists already, sorry, I missed it)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants