Explorar o código

added local check to token validation

CauseFX %!s(int64=3) %!d(string=hai) anos
pai
achega
9d80137eb6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/classes/organizr.class.php

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

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