Properly fix the removal of makepathsafe(). Sheesh.
This commit is contained in:
parent
22ea6a1be1
commit
6b83a3a5d5
|
@ -12,11 +12,15 @@ if ( isset($_REQUEST['sortorder']) ) {
|
|||
|
||||
$validext = array('cbr', 'cbz');
|
||||
|
||||
if ( $_SESSION['compath'] == "" ) $_SESSION['compath'] = "/";
|
||||
if ( isset($_REQUEST['newpath']) ) {
|
||||
$comicfull = realpath(COMICSDIR . base64_decode(urldecode($_REQUEST['newpath'])));
|
||||
if ( ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) $_SESSION['compath'] = "/";
|
||||
$comicfull = realpath(COMICSDIR . urldecode($_REQUEST['newpath']));
|
||||
if ( ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) {
|
||||
$_SESSION['compath'] = "/";
|
||||
} else {
|
||||
$_SESSION['compath'] = substr($comicfull, strlen(COMICSDIR));
|
||||
}
|
||||
}
|
||||
|
||||
$compath = $_SESSION['compath'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user