make sure that initial encryption also starts for a fresh installation
This commit is contained in:
parent
84aba4542d
commit
3d49631b8d
2 changed files with 12 additions and 11 deletions
|
@ -44,10 +44,8 @@ class Hooks {
|
|||
\OC_Util::setupFS($params['uid']);
|
||||
}
|
||||
|
||||
$util = new Util($view, $params['uid']);
|
||||
|
||||
//check if all requirements are met
|
||||
if(!$util->ready() && (!Helper::checkRequirements() || !Helper::checkConfiguration())) {
|
||||
if(!Helper::checkRequirements() || !Helper::checkConfiguration()) {
|
||||
$error_msg = $l->t("Missing requirements.");
|
||||
$hint = $l->t('Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled.');
|
||||
\OC_App::disable('files_encryption');
|
||||
|
@ -55,6 +53,8 @@ class Hooks {
|
|||
\OCP\Template::printErrorPage($error_msg, $hint);
|
||||
}
|
||||
|
||||
$util = new Util($view, $params['uid']);
|
||||
|
||||
// setup user, if user not ready force relogin
|
||||
if (Helper::setupUser($util, $params['password']) === false) {
|
||||
return false;
|
||||
|
|
|
@ -201,10 +201,11 @@ class Util {
|
|||
if (false === $this->recoveryEnabledForUser()) {
|
||||
|
||||
// create database configuration
|
||||
$sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`) VALUES (?,?,?)';
|
||||
$sql = 'INSERT INTO `*PREFIX*encryption` (`uid`,`mode`,`recovery_enabled`,`migration_status`) VALUES (?,?,?,?)';
|
||||
$args = array(
|
||||
$this->userId,
|
||||
'server-side',
|
||||
0,
|
||||
0
|
||||
);
|
||||
$query = \OCP\DB::prepare($sql);
|
||||
|
|
Loading…
Reference in a new issue