Deprecate OC.fileIsBlacklisted and move it to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
c2177caf52
commit
2f5df9387d
7 changed files with 11 additions and 9 deletions
|
@ -139,7 +139,7 @@
|
|||
throw t('files', 'File name cannot be empty.');
|
||||
} else if (trimmedName.indexOf('/') !== -1) {
|
||||
throw t('files', '"/" is not allowed inside a file name.');
|
||||
} else if (OC.fileIsBlacklisted(trimmedName)) {
|
||||
} else if (!!(trimmedName.match(OC.config.blacklist_files_regex))) {
|
||||
throw t('files', '"{name}" is not an allowed filetype', {name: name});
|
||||
}
|
||||
|
||||
|
|
BIN
core/js/dist/login.js
vendored
BIN
core/js/dist/login.js
vendored
Binary file not shown.
BIN
core/js/dist/login.js.map
vendored
BIN
core/js/dist/login.js.map
vendored
Binary file not shown.
BIN
core/js/dist/main.js
vendored
BIN
core/js/dist/main.js
vendored
Binary file not shown.
BIN
core/js/dist/main.js.map
vendored
BIN
core/js/dist/main.js.map
vendored
Binary file not shown.
|
@ -9,14 +9,6 @@ Object.assign(window.OC, {
|
|||
|
||||
theme: window.oc_defaults || {},
|
||||
|
||||
/**
|
||||
* Check if a user file is allowed to be handled.
|
||||
* @param {string} file to check
|
||||
*/
|
||||
fileIsBlacklisted: function(file) {
|
||||
return !!(file.match(OC.config.blacklist_files_regex));
|
||||
},
|
||||
|
||||
/**
|
||||
* Parses a URL query string into a JS map
|
||||
* @param {string} queryString query string in the format param1=1234¶m2=abcde¶m3=xyz
|
||||
|
|
|
@ -109,6 +109,16 @@ export default {
|
|||
PERMISSION_UPDATE,
|
||||
TAG_FAVORITE,
|
||||
|
||||
/*
|
||||
* Deprecated helpers to be removed
|
||||
*/
|
||||
/**
|
||||
* Check if a user file is allowed to be handled.
|
||||
* @param {string} file to check
|
||||
* @deprecated 17.0.0
|
||||
*/
|
||||
fileIsBlacklisted: file => !!(file.match(Config.blacklist_files_regex)),
|
||||
|
||||
addScript,
|
||||
addStyle,
|
||||
Apps,
|
||||
|
|
Loading…
Reference in a new issue