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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
8be9c04a
Commit
8be9c04a
authored
12 years ago
by
Michael Göhler
Browse files
Options
Downloads
Patches
Plain Diff
128byte is not 128bit - now we realy use 256bit (same as PHPSESSID)
parent
22fa23b4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
db_structure.xml
+1
-1
1 addition, 1 deletion
db_structure.xml
lib/base.php
+2
-2
2 additions, 2 deletions
lib/base.php
lib/util.php
+1
-1
1 addition, 1 deletion
lib/util.php
with
4 additions
and
4 deletions
db_structure.xml
+
1
−
1
View file @
8be9c04a
...
@@ -395,7 +395,7 @@
...
@@ -395,7 +395,7 @@
<type>
text
</type>
<type>
text
</type>
<default></default>
<default></default>
<notnull>
true
</notnull>
<notnull>
true
</notnull>
<length>
128
</length>
<length>
64
</length>
</field>
</field>
<field>
<field>
...
...
This diff is collapsed.
Click to expand it.
lib/base.php
+
2
−
2
View file @
8be9c04a
...
@@ -566,7 +566,7 @@ class OC{
...
@@ -566,7 +566,7 @@ class OC{
if
(
in_array
(
$_COOKIE
[
'oc_token'
],
$tokens
,
true
))
{
if
(
in_array
(
$_COOKIE
[
'oc_token'
],
$tokens
,
true
))
{
// replace successfully used token with a new one
// replace successfully used token with a new one
OC_Preferences
::
deleteKey
(
$_COOKIE
[
'oc_username'
],
'login_token'
,
$_COOKIE
[
'oc_token'
]);
OC_Preferences
::
deleteKey
(
$_COOKIE
[
'oc_username'
],
'login_token'
,
$_COOKIE
[
'oc_token'
]);
$token
=
OC_Util
::
generate_random_bytes
(
128
);
$token
=
OC_Util
::
generate_random_bytes
(
32
);
OC_Preferences
::
setValue
(
$_COOKIE
[
'oc_username'
],
'login_token'
,
$token
,
time
());
OC_Preferences
::
setValue
(
$_COOKIE
[
'oc_username'
],
'login_token'
,
$token
,
time
());
OC_User
::
setMagicInCookie
(
$_COOKIE
[
'oc_username'
],
$token
);
OC_User
::
setMagicInCookie
(
$_COOKIE
[
'oc_username'
],
$token
);
// login
// login
...
@@ -600,7 +600,7 @@ class OC{
...
@@ -600,7 +600,7 @@ class OC{
if
(
defined
(
"DEBUG"
)
&&
DEBUG
)
{
if
(
defined
(
"DEBUG"
)
&&
DEBUG
)
{
OC_Log
::
write
(
'core'
,
'Setting remember login to cookie'
,
OC_Log
::
DEBUG
);
OC_Log
::
write
(
'core'
,
'Setting remember login to cookie'
,
OC_Log
::
DEBUG
);
}
}
$token
=
OC_Util
::
generate_random_bytes
(
128
);
$token
=
OC_Util
::
generate_random_bytes
(
32
);
OC_Preferences
::
setValue
(
$_POST
[
'user'
],
'login_token'
,
$token
,
time
());
OC_Preferences
::
setValue
(
$_POST
[
'user'
],
'login_token'
,
$token
,
time
());
OC_User
::
setMagicInCookie
(
$_POST
[
"user"
],
$token
);
OC_User
::
setMagicInCookie
(
$_POST
[
"user"
],
$token
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/util.php
+
1
−
1
View file @
8be9c04a
...
@@ -83,7 +83,7 @@ class OC_Util {
...
@@ -83,7 +83,7 @@ class OC_Util {
*/
*/
public
static
function
getVersion
()
{
public
static
function
getVersion
()
{
// hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.90.0. This is not visible to the user
// hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.90.0. This is not visible to the user
return
array
(
4
,
91
,
0
1
);
return
array
(
4
,
91
,
0
0
);
}
}
/**
/**
...
...
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