summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRichard Clarkson <robert@trash-mail.com>2014-11-27 20:26:45 +0100
committerRichard Clarkson <robert@trash-mail.com>2014-11-27 20:26:45 +0100
commit0d98329cacc52b34d31d77eda6a0cf85fb4e534e (patch)
tree99514eea84e0e96034626a89d9fc075df98bfc41 /lib/private
parent05a069c1010b1f76ab1d5ce4bd0395e1ee3405c0 (diff)
downloadnextcloud-server-0d98329cacc52b34d31d77eda6a0cf85fb4e534e.tar.gz
nextcloud-server-0d98329cacc52b34d31d77eda6a0cf85fb4e534e.zip
Limit blacklist to php files
During performance optimization I have discovered that the installer scans all files for the blacklisted words. This greatly impacts speed on lower end devices such as the raspberry pie. This commit limits it to PHP files which seems to achieve the desired effect. I have used the --include option to achieve this, see http://stackoverflow.com/questions/1987926/how-do-i-grep-recursively This contribution is MIT licensed
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/installer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php
index f43969691c7..60ed06ae352 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -568,7 +568,7 @@ class OC_Installer{
// iterate the bad patterns
foreach($blacklist as $bl) {
- $cmd = 'grep -ri '.escapeshellarg($bl).' '.$folder.'';
+ $cmd = 'grep --include \\*.php -ri '.escapeshellarg($bl).' '.$folder.'';
$result = exec($cmd);
// bad pattern found
if($result<>'') {