httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r583247 - /httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
Date Tue, 09 Oct 2007 18:10:00 GMT
Author: wrowe
Date: Tue Oct  9 11:10:00 2007
New Revision: 583247

URL: http://svn.apache.org/viewvc?rev=583247&view=rev
Log:
Permit third numerical form of IPv6 addresses, e.g. ::n.n.n.n
although this form will almost certainly fail proxyport equality tests.

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_util.c?rev=583247&r1=583246&r2=583247&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_util.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_util.c Tue Oct  9 11:10:00 2007
@@ -59,19 +59,19 @@
             return FTP_REPLY_SYNTAX_ERROR;
     }
 
-    if (*family == APR_INET)
-        sep = '.';
+    argv = arg;
+    if (*arg == delim)
+        return FTP_REPLY_SYNTAX_ERROR;
+    if (*family == APR_INET) {
+        while (isdigit(*arg) || (*arg == '.')) ++arg;
+    }
 #if APR_HAVE_IPV6
-    else if (*family == APR_INET6)
-        sep = ':';
+    else if (*family == APR_INET6) {
+        while (isdigit(*arg) || (*arg == ':') || (*arg == '.')) ++arg;
+    }
 #endif
     else
         return FTP_REPLY_BAD_PROTOCOL;
-    
-    argv = arg;
-    if (*arg == delim)
-        return FTP_REPLY_SYNTAX_ERROR;
-    while (isdigit(*arg) || (*arg == sep)) ++arg;
     if (*arg != delim)
         return FTP_REPLY_SYNTAX_ERROR;
     *(arg++) = '\0';



Mime
View raw message