Ok.
I unfortunately don’t have much more time before vacation.
I hope someone can help out here.
I had to make a lot of sanity checks in order for the plugin to be secure and get it reactivated. Many of these are creating problems.
All these checks are done in the file lib/classes/SanityCheck.php
We have for example this check which checks if a path is inside a base folder:
public static function pathBeginsWith($input, $beginsWith, $errorMsg = 'Path is outside allowed path')
{
self::path($input);
if (!(strpos($input, $beginsWith) === 0)) {
throw new SanityException($errorMsg);
}
return $input;
}
To disable the test (your own responsibility! – these checks are here for security purposes), simply return $input in the first line:
Notice that such a change will be overridden on the next plugin update. Unless I find someone to maintain while I’m on vacation, there will be no updates between 30th May and the end of July
public static function pathBeginsWith($input, $beginsWith, $errorMsg = 'Path is outside allowed path')
{
// bypass check!
return $input;
self::path($input);
if (!(strpos($input, $beginsWith) === 0)) {
throw new SanityException($errorMsg);
}
return $input;
}
A better idea is to find out more about why it fails.
To debug, you could for example change the function to:
public static function pathBeginsWith($input, $beginsWith, $errorMsg = 'Path is outside allowed path')
{
self::path($input);
if (!(strpos($input, $beginsWith) === 0)) {
$errorMsg .= '. Path checked:' . $input . '. It does not begin with:' .
$beginsWith
throw new SanityException($errorMsg);
}
return $input;
}
I shall return to this issue in ~3 hours
-
This reply was modified 5 years, 5 months ago by rosell.dk.
-
This reply was modified 5 years, 5 months ago by rosell.dk.