ftpd: work around LIST -aXYZ too, not only LIST -lXYZ
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Apr 2010 22:05:10 +0000 (18:05 -0400)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Apr 2010 22:05:10 +0000 (18:05 -0400)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/Config.in
networking/ftpd.c

index 61e59b2447378dd565cd1042df67b0bb7b4cb500..ce7166f9854472487e58331f64f1c16cb4a0238e 100644 (file)
@@ -122,8 +122,8 @@ config FEATURE_FTPD_ACCEPT_BROKEN_LIST
        default y
        depends on FTPD
        help
-         Some ftp-clients (among them KDE's Konqueror) issue illegal
-         "LIST -la" requests. This option works around those problems.
+         Some ftp clients (among them KDE's Konqueror) issue illegal
+         "LIST -l" requests. This option works around such problems.
          It might prevent you from listing files starting with "-" and
          it increases the code size by ~40 bytes.
          Most other ftp servers seem to behave similar to this.
index 9d43ea3a2d5d2a81ef4fb33fab00b94ecd94df38..c63b9319e199f430154d26b2b1ca433e653ab141 100644 (file)
@@ -618,10 +618,10 @@ popen_ls(const char *opt)
        argv[4] = NULL;
 
        /* Improve compatibility with non-RFC conforming FTP clients
-        * which send e.g. "LIST -l", "LIST -la".
+        * which send e.g. "LIST -l", "LIST -la", "LIST -aL".
         * See https://bugs.kde.org/show_bug.cgi?id=195578 */
        if (ENABLE_FEATURE_FTPD_ACCEPT_BROKEN_LIST
-        && G.ftp_arg && G.ftp_arg[0] == '-' && G.ftp_arg[1] == 'l'
+        && G.ftp_arg && G.ftp_arg[0] == '-'
        ) {
                const char *tmp = strchr(G.ftp_arg, ' ');
                if (tmp) /* skip the space */