mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Fix problem with loading stylesheet in preview mode
This commit is contained in:
2
lib.php
2
lib.php
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user