Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
2f196294
Commit
2f196294
authored
Apr 4, 2013
by
Bart Visscher
Browse files
Options
Downloads
Plain Diff
Merge pull request #2706 from owncloud/random_is_random_and_not_time
Use a more random source...
parents
866221a0
6645a54c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/setup.php
+3
-3
3 additions, 3 deletions
lib/setup.php
with
3 additions
and
3 deletions
lib/setup.php
+
3
−
3
View file @
2f196294
...
...
@@ -243,7 +243,7 @@ class OC_Setup {
$dbusername
=
substr
(
'oc_'
.
$username
,
0
,
16
);
if
(
$dbusername
!=
$oldUser
)
{
//hash the password so we don't need to store the admin config in the config file
$dbpassword
=
md5
(
time
()
.
$dbpass
);
$dbpassword
=
OC_Util
::
generate_random_bytes
(
30
);
self
::
createDBUser
(
$dbusername
,
$dbpassword
,
$connection
);
...
...
@@ -333,7 +333,7 @@ class OC_Setup {
//add prefix to the postgresql user name to prevent collisions
$dbusername
=
'oc_'
.
$username
;
//create a new password so we don't need to store the admin config in the config file
$dbpassword
=
md5
(
time
()
);
$dbpassword
=
OC_Util
::
generate_random_bytes
(
30
);
self
::
pg_createDBUser
(
$dbusername
,
$dbpassword
,
$connection
);
...
...
@@ -476,7 +476,7 @@ class OC_Setup {
//add prefix to the oracle user name to prevent collisions
$dbusername
=
'oc_'
.
$username
;
//create a new password so we don't need to store the admin config in the config file
$dbpassword
=
md5
(
time
()
.
$dbpass
);
$dbpassword
=
OC_Util
::
generate_random_bytes
(
30
);
//oracle passwords are treated as identifiers:
// must start with aphanumeric char
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment