diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index fcd084a43..937d3eec3 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -676,7 +676,7 @@ zipFileField doUnpack permittedExtensions = Field{..} fieldEnctype = Multipart fieldParse _ files | [f@FileInfo{..}] <- files - , maybe True (anyOf (re _nullable . folded . unpacked) (`isExtensionOf` unpack fileName)) permittedExtensions || doUnpack + , maybe True (anyOf (re _nullable . folded . unpacked) ((flip isExtensionOf `on` CI.foldCase) $ unpack fileName)) permittedExtensions || doUnpack = return . Right . Just $ bool (yieldM . acceptFile) sourceFiles doUnpack f | null files = return $ Right Nothing | otherwise = return . Left $ SomeMessage MsgOnlyUploadOneFile