fix https login
This commit is contained in:
3
inc/toolbox.php
Normal file → Executable file
3
inc/toolbox.php
Normal file → Executable file
@@ -40,8 +40,9 @@ 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('http://', '', $sServerName.dirname($_SERVER['SCRIPT_NAME']));
|
||||
$sAppPath = 'http://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME']));
|
||||
$_GET['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':'');
|
||||
}
|
||||
|
||||
|
||||
5
jquery/common.js
vendored
Normal file → Executable file
5
jquery/common.js
vendored
Normal file → Executable file
@@ -490,8 +490,9 @@ function debug(text, bQuery)
|
||||
|
||||
function getLoginToken(sPass)
|
||||
{
|
||||
if(!window.location.origin) window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
|
||||
return md5(sPass+window.location.origin+window.location.pathname);
|
||||
//if(!window.location.origin) window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
|
||||
var sLocation = (!window.location.origin)?"http://"+window.location.hostname+(window.location.port?':'+window.location.port:''):window.location.origin.replace('https://', 'http://');
|
||||
return md5(sPass+sLocation+window.location.pathname);
|
||||
}
|
||||
|
||||
function md5(str)
|
||||
|
||||
Reference in New Issue
Block a user