Skip to content

Commit aa1d71d

Browse files
authored
Merge pull request #158 from TimSchmittmann/master
Add loopback address for ipv6 network to 'isLocal' check
2 parents 8ad9e84 + 4709c33 commit aa1d71d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpConsole/Connector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ private function proceedResponsePackage() {
488488
$response->auth = $this->auth->getServerAuthStatus($this->client->auth);
489489
}
490490
if(!$this->auth || $this->isAuthorized()) {
491-
$response->isLocal = isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] == '127.0.0.1';
491+
$response->isLocal = isset($_SERVER['REMOTE_ADDR']) && ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1');
492492
$response->docRoot = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : null;
493493
$response->sourcesBasePath = $this->sourcesBasePath;
494494
$response->isEvalEnabled = $this->isEvalListenerStarted;

0 commit comments

Comments
 (0)