Compare commits

..

No commits in common. "6b83a3a5d520f127f9653fe23d200fb1b7ef8589" and "1998cfb68b1e1299c533a3258e371c68744eed35" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -24,7 +24,6 @@ if ( !isset($_SESSION['validated']) ) {
if ( !isset($_SESSION['compath']) ) { if ( !isset($_SESSION['compath']) ) {
$_SESSION['compath'] = '/'; $_SESSION['compath'] = '/';
} }
if ( $_SESSION['compath'] == "" ) $_SESSION['compath'] = "/";
// This session variable is set to the current comic in Base64 // This session variable is set to the current comic in Base64
if ( !isset($_SESSION['comfile']) ) { if ( !isset($_SESSION['comfile']) ) {

View File

@ -12,14 +12,10 @@ 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 . urldecode($_REQUEST['newpath'])); $comicfull = realpath(COMICSDIR . base64_decode(urldecode($_REQUEST['newpath'])));
if ( ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) { if ( ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) $_SESSION['compath'] = "/";
$_SESSION['compath'] = "/";
} else {
$_SESSION['compath'] = substr($comicfull, strlen(COMICSDIR)); $_SESSION['compath'] = substr($comicfull, strlen(COMICSDIR));
}
} }
$compath = $_SESSION['compath']; $compath = $_SESSION['compath'];