summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-24 00:10:22 +0200
committerLukas Reschke <lukas@owncloud.com>2014-10-24 00:10:22 +0200
commit3efac5a4f2e8bd5cd0884598244929c2028c1894 (patch)
tree941f16f1b210e28eebbcc1666b381f40d2d3ccd0 /apps/files/ajax
parente26a16afea14df7428dd614906fc94521538dfe3 (diff)
downloadnextcloud-server-3efac5a4f2e8bd5cd0884598244929c2028c1894.tar.gz
nextcloud-server-3efac5a4f2e8bd5cd0884598244929c2028c1894.zip
Prevent division by zero
Potentially fixes https://github.com/owncloud/core/issues/11742
Diffstat (limited to 'apps/files/ajax')
-rw-r--r--apps/files/ajax/newfile.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 392fc5bd1c8..b4d91514a2a 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -33,7 +33,7 @@ function progress($notification_code, $severity, $message, $message_code, $bytes
case STREAM_NOTIFY_PROGRESS:
if ($bytes_transferred > 0) {
- if (!isset($filesize)) {
+ if (!isset($filesize) || $filesize === 0) {
} else {
$progress = (int)(($bytes_transferred/$filesize)*100);
if($progress>$lastsize) { //limit the number or messages send