Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
fc6b6371
Commit
fc6b6371
authored
Jan 04, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed hard restriction of cache keyPrefix to alnum
fixes #1773
parent
2a4739f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
6 deletions
+0
-6
Session.php
extensions/yii/redis/Session.php
+0
-4
Cache.php
framework/yii/caching/Cache.php
+0
-2
No files found.
extensions/yii/redis/Session.php
View file @
fc6b6371
...
@@ -68,8 +68,6 @@ class Session extends \yii\web\Session
...
@@ -68,8 +68,6 @@ class Session extends \yii\web\Session
* it will use a prefix generated from [[Application::id]]. You may set this property to be an empty string
* it will use a prefix generated from [[Application::id]]. You may set this property to be an empty string
* if you don't want to use key prefix. It is recommended that you explicitly set this property to some
* if you don't want to use key prefix. It is recommended that you explicitly set this property to some
* static value if the cached data needs to be shared among multiple applications.
* static value if the cached data needs to be shared among multiple applications.
*
* To ensure interoperability, only alphanumeric characters should be used.
*/
*/
public
$keyPrefix
;
public
$keyPrefix
;
...
@@ -94,8 +92,6 @@ class Session extends \yii\web\Session
...
@@ -94,8 +92,6 @@ class Session extends \yii\web\Session
}
}
if
(
$this
->
keyPrefix
===
null
)
{
if
(
$this
->
keyPrefix
===
null
)
{
$this
->
keyPrefix
=
substr
(
md5
(
Yii
::
$app
->
id
),
0
,
5
);
$this
->
keyPrefix
=
substr
(
md5
(
Yii
::
$app
->
id
),
0
,
5
);
}
elseif
(
!
ctype_alnum
(
$this
->
keyPrefix
))
{
throw
new
InvalidConfigException
(
get_class
(
$this
)
.
'::keyPrefix should only contain alphanumeric characters.'
);
}
}
parent
::
init
();
parent
::
init
();
}
}
...
...
framework/yii/caching/Cache.php
View file @
fc6b6371
...
@@ -82,8 +82,6 @@ abstract class Cache extends Component implements \ArrayAccess
...
@@ -82,8 +82,6 @@ abstract class Cache extends Component implements \ArrayAccess
parent
::
init
();
parent
::
init
();
if
(
$this
->
keyPrefix
===
null
)
{
if
(
$this
->
keyPrefix
===
null
)
{
$this
->
keyPrefix
=
substr
(
md5
(
Yii
::
$app
->
id
),
0
,
5
);
$this
->
keyPrefix
=
substr
(
md5
(
Yii
::
$app
->
id
),
0
,
5
);
}
elseif
(
!
ctype_alnum
(
$this
->
keyPrefix
))
{
throw
new
InvalidConfigException
(
get_class
(
$this
)
.
'::keyPrefix should only contain alphanumeric characters.'
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment