$server_db_isLocal - account for IPv6 loopback address

Only the most common form ('::1') is recognized
This commit is contained in:
Piotr Przybylski 2011-07-20 18:42:50 +02:00
parent 23c5e3282f
commit e386d58986

View File

@ -557,7 +557,8 @@ $server = 1;
if(isset($_REQUEST['server']) && intval($_REQUEST['server'])) $server = intval($_REQUEST['server']);
$server_db_isLocal = strtolower($cfg['Servers'][$server]['host']) == 'localhost'
|| $cfg['Servers'][$server]['host'] == '127.0.0.1';
|| $cfg['Servers'][$server]['host'] == '127.0.0.1'
|| $cfg['Servers'][$server]['host'] == '::1';
?>
<script type="text/javascript">