From b953f34f3599975505663213e14e7868ac8c5816 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 20 Jul 2007 16:58:50 +0000 Subject: [PATCH] fix decryption of ipv6 headers (thanks Tomas Kuliavas) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12563 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- contrib/decrypt_headers.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/decrypt_headers.php b/contrib/decrypt_headers.php index 7304b727..7f0f3935 100644 --- a/contrib/decrypt_headers.php +++ b/contrib/decrypt_headers.php @@ -36,14 +36,14 @@ function hex2ip($hex) { .hexdec(substr($hex,4,2)).'.' .hexdec(substr($hex,6,2)); } elseif (strlen($hex)==32) { - $ret=hexdec(substr($hex,0,4)).':' - .hexdec(substr($hex,4,4)).':' - .hexdec(substr($hex,8,4)).':' - .hexdec(substr($hex,12,4)).':' - .hexdec(substr($hex,16,4)).':' - .hexdec(substr($hex,20,4)).':' - .hexdec(substr($hex,24,4)).':' - .hexdec(substr($hex,28,4)); + $ret=substr($hex,0,4).':' + .substr($hex,4,4).':' + .substr($hex,8,4).':' + .substr($hex,12,4).':' + .substr($hex,16,4).':' + .substr($hex,20,4).':' + .substr($hex,24,4).':' + .substr($hex,28,4); } else { $ret=$hex; } @@ -88,4 +88,4 @@ Check, if it is an address string:
Submit

- \ No newline at end of file + -- 2.25.1