mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-07 05:45:53 +01:00
fixes for GHSA-85r3-mf4x-qp8f
This commit is contained in:
@@ -1325,10 +1325,9 @@ class AdminController extends AdminBaseController
|
||||
|
||||
try {
|
||||
if ($download) {
|
||||
$file = base64_decode(urldecode($download));
|
||||
$backups_root_dir = $this->grav['locator']->findResource('backup://', true);
|
||||
|
||||
if (0 !== strpos($file, $backups_root_dir)) {
|
||||
$filename = basename(base64_decode(urldecode($download)));
|
||||
$file = $this->grav['locator']->findResource("backup://{$filename}", true);
|
||||
if (!$file) {
|
||||
header('HTTP/1.1 401 Unauthorized');
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user