0
0
mirror of https://github.com/florisboard/florisboard.git synced 2024-09-19 19:42:20 +02:00

Prevent large file size attacks by limiting the max file size to 100MB

This commit is contained in:
lm41 2024-06-02 00:58:44 +02:00
parent f1bdf216fc
commit 30294b02b4
No known key found for this signature in database

View File

@ -158,6 +158,9 @@ object ZipUtils {
private fun ZipFile.copy(srcEntry: ZipEntry, dstFile: FsFile) {
dstFile.outputStream().use { outStream ->
if (srcEntry.size > 100000000) {
return
}
this.getInputStream(srcEntry).use { inStream ->
inStream.copyTo(outStream)
}