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:
parent
f1bdf216fc
commit
30294b02b4
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user