]> source.dussan.org Git - nextcloud-server.git/commitdiff
only encrypt files and files_versions
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 1 Apr 2015 11:58:50 +0000 (13:58 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 7 Apr 2015 11:30:30 +0000 (13:30 +0200)
apps/encryption/lib/crypto/encryption.php

index aa62078582447bf8b84268d7d954c86a29afcbc3..d8b7f91e2680040fd05147f0357cdfc01cd18918 100644 (file)
@@ -278,7 +278,19 @@ class Encryption implements IEncryptionModule {
         * @return boolean
         */
        public function shouldEncrypt($path) {
-               return true;
+               $parts = explode('/', $path);
+               if (count($parts) < 3) {
+                       return false;
+               }
+
+               if ($parts[2] == '/files/') {
+                       return true;
+               }
+               if ($parts[2] == '/files_versions/') {
+                       return true;
+               }
+
+               return false;
        }
 
        /**