mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Add protection for non-authorized char in installation form
This commit is contained in:
parent
5962a0d4ac
commit
9921ca11b5
1 changed files with 8 additions and 2 deletions
|
|
@ -221,12 +221,18 @@ class OC_Setup {
|
|||
OC_DB::createDbFromStructure('db_structure.xml');
|
||||
}
|
||||
|
||||
//create the user and group
|
||||
try {
|
||||
OC_User::createUser($username, $password);
|
||||
}
|
||||
catch(Exception $exception) {
|
||||
$error[] = $exception->getMessage();
|
||||
}
|
||||
|
||||
if(count($error) == 0) {
|
||||
OC_Appconfig::setValue('core', 'installedat',microtime(true));
|
||||
OC_Appconfig::setValue('core', 'lastupdatedat',microtime(true));
|
||||
|
||||
//create the user and group
|
||||
OC_User::createUser($username, $password);
|
||||
OC_Group::createGroup('admin');
|
||||
OC_Group::addToGroup($username, 'admin');
|
||||
OC_User::login($username, $password);
|
||||
|
|
|
|||
Loading…
Reference in a new issue