aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 5c737d41793..8c6fc0d9c07 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -225,6 +225,14 @@ var OCP = {},
},
/**
+ * 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));
+ },
+
+ /**
* Redirect to the target URL, can also be used for downloads.
* @param {string} targetURL URL to redirect to
*/