Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Session')
-rw-r--r--core/Session/SessionAuth.php5
-rw-r--r--core/Session/SessionFingerprint.php20
2 files changed, 1 insertions, 24 deletions
diff --git a/core/Session/SessionAuth.php b/core/Session/SessionAuth.php
index 0c23f13cc2..e185600100 100644
--- a/core/Session/SessionAuth.php
+++ b/core/Session/SessionAuth.php
@@ -99,11 +99,6 @@ class SessionAuth implements Auth
return $this->makeAuthFailure();
}
- if (!$sessionFingerprint->isMatchingCurrentRequest()) {
- $this->initNewBlankSession($sessionFingerprint);
- return $this->makeAuthFailure();
- }
-
$tsPasswordModified = !empty($user['ts_password_modified']) ? $user['ts_password_modified'] : null;
if ($this->isSessionStartedBeforePasswordChange($sessionFingerprint, $tsPasswordModified)) {
$this->destroyCurrentSession($sessionFingerprint);
diff --git a/core/Session/SessionFingerprint.php b/core/Session/SessionFingerprint.php
index 2239661fb9..8b61c62817 100644
--- a/core/Session/SessionFingerprint.php
+++ b/core/Session/SessionFingerprint.php
@@ -56,12 +56,11 @@ class SessionFingerprint
return null;
}
- public function initialize($userName, $time = null, $userAgent = null)
+ public function initialize($userName, $time = null)
{
$_SESSION[self::USER_NAME_SESSION_VAR_NAME] = $userName;
$_SESSION[self::SESSION_INFO_SESSION_VAR_NAME] = [
'ts' => $time ?: Date::now()->getTimestampUTC(),
- 'ua' => $userAgent ?: $this->getUserAgent(),
];
}
@@ -71,18 +70,6 @@ class SessionFingerprint
unset($_SESSION[self::SESSION_INFO_SESSION_VAR_NAME]);
}
- public function isMatchingCurrentRequest()
- {
- $requestUa = $this->getUserAgent();
-
- $userInfo = $this->getUserInfo();
- if (empty($userInfo)) {
- return false;
- }
-
- return $userInfo['ua'] == $requestUa;
- }
-
public function getSessionStartTime()
{
$userInfo = $this->getUserInfo();
@@ -94,9 +81,4 @@ class SessionFingerprint
return $userInfo['ts'];
}
-
- private function getUserAgent()
- {
- return array_key_exists('HTTP_USER_AGENT', $_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null;
- }
}