aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorArtur Neumann <info@individual-it.net>2017-02-27 12:34:15 +0545
committerArtur Neumann <info@individual-it.net>2017-02-28 07:38:11 +0545
commitf1fccaca0605a5d183f78b2c39d2e09a54753787 (patch)
treeb63d877889120d12bc59e2103ad64c1568e8186b /settings
parentd0c6179ec18d1e2c3ce86bdf03f36aaa1501c6e7 (diff)
downloadnextcloud-server-f1fccaca0605a5d183f78b2c39d2e09a54753787.tar.gz
nextcloud-server-f1fccaca0605a5d183f78b2c39d2e09a54753787.zip
better quota validation
this fixes #3634 1. fixed computerFileSize to be more picky about incorrect values 2. more tests for computerFileSize 3. use computerFileSize to validate user quota Signed-off-by: Artur Neumann <info@individual-it.net>
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index a2ccc059f15..d23bd553246 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -533,7 +533,7 @@ var UserList = {
if (quota === 'other') {
return;
}
- if ((quota !== 'default' && quota !=="none") && (isNaN(parseInt(quota, 10)) || parseInt(quota, 10) < 0)) {
+ if ((quota !== 'default' && quota !=="none") && (!OC.Util.computerFileSize(quota))) {
// the select component has added the bogus value, delete it again
$select.find('option[selected]').remove();
OC.Notification.showTemporary(t('core', 'Invalid quota value "{val}"', {val: quota}));