芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cansahcab.gob.mx/libraries/vendor/joomla/session/src/Validator/AddressValidator.php
input = $input; $this->session = $session; } /** * Validates the session * * @param boolean $restart Flag if the session should be restarted * * @return void * * @since 2.0.0 * @throws InvalidSessionException */ public function validate(bool $restart = false): void { if ($restart) { $this->session->set('session.client.address', null); } $remoteAddr = $this->input->server->getString('REMOTE_ADDR', ''); // Check for client address if (!empty($remoteAddr) && filter_var($remoteAddr, FILTER_VALIDATE_IP) !== false) { $ip = $this->session->get('session.client.address'); if ($ip === null) { $this->session->set('session.client.address', $remoteAddr); } elseif ($remoteAddr !== $ip) { throw new InvalidSessionException('Invalid client IP'); } } } }