Compare commits
2 Commits
1998cfb68b
...
6b83a3a5d5
Author | SHA1 | Date | |
---|---|---|---|
6b83a3a5d5 | |||
22ea6a1be1 |
|
@ -24,6 +24,7 @@ if ( !isset($_SESSION['validated']) ) {
|
|||
if ( !isset($_SESSION['compath']) ) {
|
||||
$_SESSION['compath'] = '/';
|
||||
}
|
||||
if ( $_SESSION['compath'] == "" ) $_SESSION['compath'] = "/";
|
||||
|
||||
// This session variable is set to the current comic in Base64
|
||||
if ( !isset($_SESSION['comfile']) ) {
|
||||
|
|
|
@ -12,10 +12,14 @@ 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