fixing serv_name value with proper protocol
This commit is contained in:
@@ -2627,7 +2627,7 @@ class Databap extends PhpObject
|
||||
|
||||
private static function getLoginToken($sPass)
|
||||
{
|
||||
return md5($sPass.$_GET['serv_name']);
|
||||
return md5($sPass.str_replace('https://', 'http://', $_GET['serv_name']));
|
||||
}
|
||||
|
||||
public function checkSetPass($sToken, $sNewToken)
|
||||
|
||||
@@ -40,9 +40,8 @@ class ToolBox
|
||||
$_REQUEST = array_merge($_GET, $_REQUEST);
|
||||
|
||||
//Add Server Name
|
||||
//FIXME http/https value
|
||||
$sServerName = array_key_exists('SERVER_NAME', $_SERVER)?$_SERVER['SERVER_NAME']:$_SERVER['PWD'];
|
||||
$sAppPath = 'http://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME']));
|
||||
$sAppPath = $_SERVER['REQUEST_SCHEME'].str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME']));
|
||||
$_GET['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':'');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user