Merge pull request #139 from catalyst/StyleSheetLoadingError

Fix problem with loading stylesheet in preview mode
This commit is contained in:
Dmitrii Metelkin
2018-11-16 13:36:02 +11:00
committed by GitHub

View File

@@ -75,7 +75,7 @@ function auth_outage_get_climaintenance_resource_file($file) {
// Protect against path traversal attacks.
$basename = basename($file);
if ($basename !== $file) {
if ($basename !== $file && $file !== 'preview/' . $basename) {
// @codingStandardsIgnoreStart
if (!PHPUNIT_TEST) {
error_log('Possible attempt for Path Traversal Attack (only filename expected): '.$file);