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