diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/files.js | 3 | ||||
-rw-r--r-- | apps/files/tests/js/filesSpec.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 99f888ce0f7..38a08d4888c 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -101,7 +101,10 @@ throw t('files', '"{name}" is an invalid file name.', {name: name}); } else if (trimmedName.length === 0) { throw t('files', 'File name cannot be empty.'); + } else if (OC.fileIsBlacklisted(trimmedName)) { + throw t('files', '"{name}" is not an allow filetype', {name: name}); } + return true; }, displayStorageWarnings: function() { diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js index b7627d59fdf..5c3f68b2ba4 100644 --- a/apps/files/tests/js/filesSpec.js +++ b/apps/files/tests/js/filesSpec.js @@ -58,7 +58,9 @@ describe('OCA.Files.Files tests', function() { ' ..', '.. ', '. ', - ' .' + ' .', + 'foo.part', + 'bar.filepart' ]; for ( var i = 0; i < fileNames.length; i++ ) { var threwException = false; |