Applied fix from kalassico for "Chiper text must be a string" bug (http://forum.owncloud.org/viewtopic.php?f=3&t=2586&p=5094)
This commit is contained in:
parent
3b36a9b704
commit
e93bb5135d
|
@ -44,7 +44,13 @@ class OC_Crypt {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function init($login,$password) {
|
public static function init($login,$password) {
|
||||||
|
$view1=new OC_FilesystemView('/');
|
||||||
|
if(!$view1->file_exists('/'.$login)){
|
||||||
|
$view1->mkdir('/'.$login);
|
||||||
|
}
|
||||||
|
|
||||||
$view=new OC_FilesystemView('/'.$login);
|
$view=new OC_FilesystemView('/'.$login);
|
||||||
|
|
||||||
OC_FileProxy::$enabled=false;
|
OC_FileProxy::$enabled=false;
|
||||||
if(!$view->file_exists('/encryption.key')){// does key exist?
|
if(!$view->file_exists('/encryption.key')){// does key exist?
|
||||||
OC_Crypt::createkey($login,$password);
|
OC_Crypt::createkey($login,$password);
|
||||||
|
@ -54,6 +60,7 @@ class OC_Crypt {
|
||||||
$_SESSION['enckey']=OC_Crypt::decrypt($key, $password);
|
$_SESSION['enckey']=OC_Crypt::decrypt($key, $password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the blowfish encryption handeler for a key
|
* get the blowfish encryption handeler for a key
|
||||||
* @param string $key (optional)
|
* @param string $key (optional)
|
||||||
|
|
Loading…
Reference in New Issue