Procházet zdrojové kódy

added local check to token validation

CauseFX před 4 roky
rodič
revize
9d80137eb6
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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);