Skip to content

PHP function finfo_file() maybe disabled #20

@Ezyweb-uk

Description

@Ezyweb-uk

Function testIsImage() uses PHP function finfo_file() to retrieve the mimeType, but on a shared server function finfo_file() may be disabled for security. Perhaps the code could be extended to first check if finfo_file() is enabled and if not then check the file extension as a fallback?

Refs:
https://expressionengine.com/forums/topic/247821/workaround-for-disabled-php-fileinfo-extension
https://stackoverflow.com/questions/134833/how-do-i-find-the-mime-type-of-a-file-with-php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions