Skip to content

Infer the mime type for the uploaded files from their byte contents instead of their extension #50

@adamziel

Description

@adamziel

#48 Introduced a support for file uploads. Unfortunately, it infers the Content-type based on the file extension. This is unsafe, unreliable, and may lead to code execution vulnerabilities if a PHP file is uploaded with a different extension. Let's infer the Content-type from the file contents instead of its extension.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions