Sfoglia il codice sorgente

added local check to token validation

CauseFX 4 anni fa
parent
commit
9d80137eb6
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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);