diff --git a/common.php b/common.php index 704f58b..6f492a4 100644 --- a/common.php +++ b/common.php @@ -826,7 +826,7 @@ function gethiddenpass($path,$passfile) $path1 = path_format($_SERVER['list_path'] . path_format($path)); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); $password=getcache('path_' . $path1 . '/?password', $_SERVER['disktag']); - if ($password=='') { + if ($password===false) { $ispassfile = get_content(path_format($path . '/' . urlencode($passfile))); //echo $path . '
' . json_encode($ispassfile, JSON_PRETTY_PRINT) . ''; if ($ispassfile['type']=='file') { @@ -981,11 +981,11 @@ function output($body, $statusCode = 200, $headers = ['Content-Type' => 'text/ht function passhidden($path) { if ($_SERVER['admin']) return 0; - $path = str_replace('+','%2B',$path); - $path = str_replace('&','&', path_format(urldecode($path))); + //$path = str_replace('+','%2B',$path); + //$path = str_replace('&','&', path_format(urldecode($path))); if (getConfig('passfile') != '') { - $path = spurlencode($path,'/'); - if (substr($path,-1)=='/') $path=substr($path,0,-1); + //$path = spurlencode($path,'/'); + //if (substr($path,-1)=='/') $path=substr($path,0,-1); $hiddenpass=gethiddenpass($path, getConfig('passfile')); if ($hiddenpass != '') { return comppass($hiddenpass); @@ -1075,7 +1075,7 @@ function adminform($name = '', $pass = '', $storage = '', $path = '') function adminoperate($path) { global $drive; - $path1 = path_format($_SERVER['list_path'] . path_format($path)); + $path1 = path_format($_SERVER['list_path'] . '/' . $path); if (substr($path1, -1)=='/') $path1=substr($path1, 0, -1); $tmpget = $_GET; $tmppost = $_POST; @@ -1119,7 +1119,7 @@ function adminoperate($path) if (${$VAR}['encrypt_folder']=='/') ${$VAR}['encrypt_folder']==''; $folder['path'] = path_format($path1 . '/' . spurlencode(${$VAR}['encrypt_folder'], '/')); $folder['name'] = ${$VAR}['encrypt_folder']; - $folder['id'] = ${$VAR}['id']; + $folder['id'] = ${$VAR}['encrypt_fileid']; return $drive->Encrypt($folder, getConfig('passfile'), ${$VAR}['encrypt_newpass']); } if (isset($tmpget['move_folder']) || isset($tmppost['move_folder'])) {