bakape / thumbnailer

Go media thumbnailer
MIT License
154 stars 36 forks source link

Improper file extension detection #52

Closed Chiiruno closed 5 years ago

Chiiruno commented 5 years ago

Screenshot_20190312_092500

medukatheguca commented 5 years ago

https://github.com/bakape/thumbnailer/blob/0b14c8002954c7a013b38bdb40e6ee10f3ed2c06/archives.go#L113 ext to lowercase will fix the issue

bakape commented 5 years ago

Since when are upper case extensions allowed?

medukatheguca commented 5 years ago

You can upload an archive with uppercase extensions inside which I guess don't get checked by the thumbnailer the same way they normally do as single files.

bakape commented 5 years ago

There is no reason it should be rejected based on the extension, but I should also not accommodate user retardation.

On Tue, 12 Mar 2019 at 21:38, medukatheguca notifications@github.com wrote:

You can upload an archive with uppercase extensions which I guess doesn't get checked yet by the thumbnailer.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bakape/thumbnailer/issues/52#issuecomment-472150853, or mute the thread https://github.com/notifications/unsubscribe-auth/AHfPsB_olDtba5HIflLwAAk7xyiAJfGcks5vWAIogaJpZM4brCdL .

medukatheguca commented 5 years ago

Here's a reference of an archive of pngs and an archive of PNGs

bakape commented 5 years ago

PEBCAK

Chiiruno commented 5 years ago

Yes, however it's a simple enough fix to accommodate said problem without a real performance penalty.