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
61578a10
Commit
61578a10
authored
9 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #20193 from owncloud/redis-password
Add support for Redis password auth
parents
6911d8f0
78cad94f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/config.sample.php
+5
-0
5 additions, 0 deletions
config/config.sample.php
lib/private/memcache/redis.php
+3
-0
3 additions, 0 deletions
lib/private/memcache/redis.php
with
8 additions
and
0 deletions
config/config.sample.php
+
5
−
0
View file @
61578a10
...
...
@@ -879,11 +879,16 @@ $CONFIG = array(
/**
* Connection details for redis to use for memory caching.
*
* For enhanced security it is recommended to configure Redis
* to require a password. See http://redis.io/topics/security
* for more information.
*/
'redis'
=>
array
(
'host'
=>
'localhost'
,
// can also be a unix domain socket: '/tmp/redis.sock'
'port'
=>
6379
,
'timeout'
=>
0.0
,
'password'
=>
''
,
// Optional, if not defined no password will be used.
'dbindex'
=>
0
,
// Optional, if undefined SELECT will not run and will use Redis Server's default DB Index.
),
...
...
This diff is collapsed.
Click to expand it.
lib/private/memcache/redis.php
+
3
−
0
View file @
61578a10
...
...
@@ -56,6 +56,9 @@ class Redis extends Cache implements IMemcache {
}
self
::
$cache
->
connect
(
$host
,
$port
,
$timeout
);
if
(
isset
(
$config
[
'password'
])
&&
$config
[
'password'
]
!==
''
)
{
self
::
$cache
->
auth
(
$config
[
'password'
]);
}
if
(
isset
(
$config
[
'dbindex'
]))
{
self
::
$cache
->
select
(
$config
[
'dbindex'
]);
...
...
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