mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Lazy load phpseclib in ext storage config
This commit is contained in:
parent
cf23defa52
commit
1e4e0cfcd5
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue