summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-05-07 22:12:30 +0000
committerBrice Maron <brice@bmaron.net>2012-05-07 22:12:30 +0000
commit9921ca11b56637bdb6d1e1c2b6bb7c932cf3cd55 (patch)
tree33a10a614966c297083241bcffc9dc8b4687d39d
parent5962a0d4ac9f9fabd9fcb604476ec7c353477e94 (diff)
downloadnextcloud-server-9921ca11b56637bdb6d1e1c2b6bb7c932cf3cd55.tar.gz
nextcloud-server-9921ca11b56637bdb6d1e1c2b6bb7c932cf3cd55.zip
Add protection for non-authorized char in installation form
-rw-r--r--lib/setup.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php
index 24d05592377..59e4bf0dee2 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -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);