From 90003744e4c595fd09b47d824f99648e874e4d48 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 5 Oct 2013 14:54:56 +0000 Subject: [PATCH] IPv6 check --- lam/lib/account.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 8f0f667e..c90daa5d 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -565,6 +565,9 @@ function get_preg($argument, $regexp) { case 'ip': // IP address $pregexpr = '/^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}$/'; break; + case 'ip6': // IPv6 address (only basic check) + $pregexpr = '/^[0-9a-f:]+$/i'; + break; case 'ascii': // ASCII $pregexpr = '/^[' . chr(1) . '-' . chr(128) . ']*$/'; break;