When generating an outage maintenance page, images and other files are downloaded and stored in a temporary location that is publicly accessible.
However if you have a file that is accessible when only logged in (but is accessible to everyone), such as a footer image linked to a mod_folder file, this will download the login page instead and not the image.
Specifically here,
|
$curl = new curl(['ignoresecurity' => true]); |
there should be some better handling, e.g. if we are expecting an image but it downloaded html it should output a warning so the user can fix it up, or alternatively find a way to properly save these files (such as being logged in as admin when creating outage, but this has other implications)
When generating an outage maintenance page, images and other files are downloaded and stored in a temporary location that is publicly accessible.
However if you have a file that is accessible when only logged in (but is accessible to everyone), such as a footer image linked to a mod_folder file, this will download the login page instead and not the image.
Specifically here,
moodle-auth_outage/classes/local/outagelib.php
Line 60 in f994a97
there should be some better handling, e.g. if we are expecting an image but it downloaded html it should output a warning so the user can fix it up, or alternatively find a way to properly save these files (such as being logged in as admin when creating outage, but this has other implications)