Преглед изворни кода

added local check to token validation

CauseFX пре 4 година
родитељ
комит
9d80137eb6
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      api/classes/organizr.class.php

+ 1 - 1
api/classes/organizr.class.php

@@ -1702,7 +1702,7 @@ class Organizr
 						return false;
 						return false;
 					}
 					}
 				}
 				}
-				if ($allTokens[$tokenKey]['ip'] !== $this->userIP()) {
+				if (($allTokens[$tokenKey]['ip'] !== $this->userIP()) && (!$this->isLocalOrServer())) {
 					if ($this->config['matchUserIP']) {
 					if ($this->config['matchUserIP']) {
 						$this->setLoggerChannel('Authentication')->warning('Mismatch of user IP', ['token' => $allTokens[$tokenKey]['ip'], 'user' => $this->userIP()]);
 						$this->setLoggerChannel('Authentication')->warning('Mismatch of user IP', ['token' => $allTokens[$tokenKey]['ip'], 'user' => $this->userIP()]);
 						$this->invalidToken($token);
 						$this->invalidToken($token);