mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass mask=PEAR_LOG_DEBUG to getLogger()
This commit is contained in:
parent
17673db914
commit
f36735ef81
|
@ -3,8 +3,9 @@ include("../inc/inc.Settings.php");
|
|||
|
||||
require_once("../inc/inc.Language.php");
|
||||
require_once("../inc/inc.Utils.php");
|
||||
require_once("Log.php");
|
||||
|
||||
$logger = getLogger('restapi-');
|
||||
$logger = getLogger('restapi-', PEAR_LOG_DEBUG);
|
||||
|
||||
require_once("../inc/inc.Init.php");
|
||||
require_once("../inc/inc.Extension.php");
|
||||
|
@ -259,7 +260,7 @@ class RestapiController { /* {{{ */
|
|||
|
||||
if(!$userobj) {
|
||||
setcookie("mydms_session", '', time()-3600, $settings->_httpRoot);
|
||||
$logger->log("Login with user name '".$username."' failed", PEAR_LOG_INFO);
|
||||
$logger->log("Login with user name '".$username."' failed", PEAR_LOG_ERR);
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Login failed', 'data'=>''), 403);
|
||||
} else {
|
||||
require_once("../inc/inc.ClassSession.php");
|
||||
|
@ -2667,12 +2668,11 @@ class Auth { /* {{{ */
|
|||
$session = new SeedDMS_Session($dms->getDb());
|
||||
if (isset($_COOKIE["mydms_session"])) {
|
||||
$dms_session = $_COOKIE["mydms_session"];
|
||||
$logger->log("Session key: ".$dms_session, PEAR_LOG_DEBUG);
|
||||
if(!$resArr = $session->load($dms_session)) {
|
||||
/* Delete Cookie */
|
||||
setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot);
|
||||
if($settings->_enableGuestLogin)
|
||||
$userobj = $dms->getUser($settings->_guestID);
|
||||
else
|
||||
$logger->log("Session for id '".$dms_session."' has gone", PEAR_LOG_ERR);
|
||||
return $response->withStatus(403);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user