Fix built full path to comic with missing path separator

This commit is contained in:
Junior 2026-11-08 15:08:19 -05:00
parent dcb521cb49
commit 7418063888

View File

@ -21,7 +21,9 @@ if ( !$validated ) {
$newpath = urldecode($_REQUEST['path']); $newpath = urldecode($_REQUEST['path']);
$comicfull = realpath(COMICSDIR . $newpath); $data["newreq"] = $newpath;
$comicfull = realpath(COMICSDIR . "/" . $newpath);
$data["comicfull"] = $comicfull;
if ( ($newpath == "/") || ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) { if ( ($newpath == "/") || ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) {
$_SESSION['compath'] = "/"; $_SESSION['compath'] = "/";
} else { } else {