encrypt via fileID, try fix get pass from specialchars folder
parent
9623e03c3f
commit
07664407c6
14
common.php
14
common.php
|
@ -826,7 +826,7 @@ function gethiddenpass($path,$passfile)
|
||||||
$path1 = path_format($_SERVER['list_path'] . path_format($path));
|
$path1 = path_format($_SERVER['list_path'] . path_format($path));
|
||||||
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
|
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
|
||||||
$password=getcache('path_' . $path1 . '/?password', $_SERVER['disktag']);
|
$password=getcache('path_' . $path1 . '/?password', $_SERVER['disktag']);
|
||||||
if ($password=='') {
|
if ($password===false) {
|
||||||
$ispassfile = get_content(path_format($path . '/' . urlencode($passfile)));
|
$ispassfile = get_content(path_format($path . '/' . urlencode($passfile)));
|
||||||
//echo $path . '<pre>' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '</pre>';
|
//echo $path . '<pre>' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '</pre>';
|
||||||
if ($ispassfile['type']=='file') {
|
if ($ispassfile['type']=='file') {
|
||||||
|
@ -981,11 +981,11 @@ function output($body, $statusCode = 200, $headers = ['Content-Type' => 'text/ht
|
||||||
function passhidden($path)
|
function passhidden($path)
|
||||||
{
|
{
|
||||||
if ($_SERVER['admin']) return 0;
|
if ($_SERVER['admin']) return 0;
|
||||||
$path = str_replace('+','%2B',$path);
|
//$path = str_replace('+','%2B',$path);
|
||||||
$path = str_replace('&','&', path_format(urldecode($path)));
|
//$path = str_replace('&','&', path_format(urldecode($path)));
|
||||||
if (getConfig('passfile') != '') {
|
if (getConfig('passfile') != '') {
|
||||||
$path = spurlencode($path,'/');
|
//$path = spurlencode($path,'/');
|
||||||
if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
//if (substr($path,-1)=='/') $path=substr($path,0,-1);
|
||||||
$hiddenpass=gethiddenpass($path, getConfig('passfile'));
|
$hiddenpass=gethiddenpass($path, getConfig('passfile'));
|
||||||
if ($hiddenpass != '') {
|
if ($hiddenpass != '') {
|
||||||
return comppass($hiddenpass);
|
return comppass($hiddenpass);
|
||||||
|
@ -1075,7 +1075,7 @@ function adminform($name = '', $pass = '', $storage = '', $path = '')
|
||||||
function adminoperate($path)
|
function adminoperate($path)
|
||||||
{
|
{
|
||||||
global $drive;
|
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);
|
if (substr($path1, -1)=='/') $path1=substr($path1, 0, -1);
|
||||||
$tmpget = $_GET;
|
$tmpget = $_GET;
|
||||||
$tmppost = $_POST;
|
$tmppost = $_POST;
|
||||||
|
@ -1119,7 +1119,7 @@ function adminoperate($path)
|
||||||
if (${$VAR}['encrypt_folder']=='/') ${$VAR}['encrypt_folder']=='';
|
if (${$VAR}['encrypt_folder']=='/') ${$VAR}['encrypt_folder']=='';
|
||||||
$folder['path'] = path_format($path1 . '/' . spurlencode(${$VAR}['encrypt_folder'], '/'));
|
$folder['path'] = path_format($path1 . '/' . spurlencode(${$VAR}['encrypt_folder'], '/'));
|
||||||
$folder['name'] = ${$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']);
|
return $drive->Encrypt($folder, getConfig('passfile'), ${$VAR}['encrypt_newpass']);
|
||||||
}
|
}
|
||||||
if (isset($tmpget['move_folder']) || isset($tmppost['move_folder'])) {
|
if (isset($tmpget['move_folder']) || isset($tmppost['move_folder'])) {
|
||||||
|
|
Loading…
Reference in New Issue