From 6b31846c438dc19cca0f2a01582bdf47dff61f81 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 12 Aug 2015 15:11:20 -0400
Subject: [PATCH] Fix IPv6 address validation on PHP with disabled IPv6 support

---
 program/lib/Roundcube/rcube_utils.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php
index eef554e..162d4cb 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -156,7 +156,7 @@
                 $length = strlen($part);
                 if (!$length) {
                     // there can be only one ::
-                    if ($found_empty) {
+                    if ($found_empty && $idx > 2) {
                         return false;
                     }
                     $found_empty = true;

--
Gitblit v1.9.1