Skip to content

spoofed_media_type error when the file name is broken #131

@sobrinho

Description

@sobrinho

Describe the bug
Using a file named original. breaks the spoof validation.

To Reproduce
Attach a file on a URL that returns the content type header as image/png but the file name is broken such as original..

Expected behavior
Ignore the spoof validation against file extension.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
Probably broken because of:

File.extname("original.")
#=> "."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions