Use DS instead of checking both slash styles.

Refs #5905
This commit is contained in:
mark_story 2015-03-09 21:55:07 -04:00
parent 43f16f38f0
commit cad57dcc28

View file

@ -1336,7 +1336,7 @@ class CakeResponse {
'download' => null
);
if (strpos($path, '../') !== false || strpos($path, '..\\') !== false) {
if (strpos($path, '..' . DS) !== false) {
throw new NotFoundException(__d(
'cake_dev',
'The requested file contains `..` and will not be read.'