]> source.dussan.org Git - nextcloud-server.git/commitdiff
Lazy load phpseclib in ext storage config
authorVincent Petry <pvince81@owncloud.com>
Thu, 20 Mar 2014 12:21:34 +0000 (13:21 +0100)
committerVincent Petry <pvince81@owncloud.com>
Thu, 20 Mar 2014 12:21:34 +0000 (13:21 +0100)
apps/files_external/lib/config.php

index dbb12ecd9bb1e41d88d69f5f952ea7f0cb091f23..f13b25b2e281408280ea2f0ce52c60e4c8905eaa 100755 (executable)
@@ -24,7 +24,6 @@ set_include_path(
        get_include_path() . PATH_SEPARATOR .
        \OC_App::getAppPath('files_external') . '/3rdparty/phpseclib/phpseclib'
 );
-include('Crypt/AES.php');
 
 /**
  * Class to configure mount.json globally and for users
@@ -703,6 +702,9 @@ class OC_Mount_Config {
        private static function getCipher() {
                // note: not caching this to make it thread safe as we'll use
                // a different IV for each password
+               if (!class_exists('Crypt_AES', false)) {
+                       include('Crypt/AES.php');
+               }
                $cipher = new Crypt_AES(CRYPT_AES_MODE_CBC);
                $cipher->setKey(\OCP\Config::getSystemValue('passwordsalt'));
                return $cipher;