-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix : check if is_file in getMimeType #590
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello in order to understand why you added these options, we would need to understand what situation you were in 😉
} | ||
if (!$mimeType) { | ||
$mimeType = trim(exec('file -bi ' . escapeshellarg($filename))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waaaaah 🤯 I did not know this code performed an exec
... it's a bit frightening 😅 for security issues
Hello,
but all my files is in the right folder. If you check if is a file before get mime type, it's avoid the warning. |
Thanks @julienmiclo so if I understand
|
According to AdminBlockListingController.php#L178-L201, we can use |
Hello,
on my localhost i have some warning when filename are check with getMimeType function.
I added an if condition around 4 Try with mime type.