diff --git a/includes/common.php b/includes/common.php index 2a7129db37..ad719a5e67 100644 --- a/includes/common.php +++ b/includes/common.php @@ -32,6 +32,10 @@ function external_exec($command) function shorthost($hostname, $len=12) { + # IP addresses should not be shortened + if (filter_var($hostname, FILTER_VALIDATE_IP)) + return $hostname; + $parts = explode(".", $hostname); $shorthost = $parts[0]; $i = 1;