Index: modules/mod_ls.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/modules/mod_ls.c,v
retrieving revision 1.190
diff -u -r1.190 mod_ls.c
--- modules/mod_ls.c 19 Nov 2011 02:40:12 -0000 1.190
+++ modules/mod_ls.c 21 Nov 2011 21:56:05 -0000
@@ -460,6 +460,11 @@
m[len] = '\0';
+ /* If the symlink points to either '.' or '..', skip it (Bug#3719). */
+ if (is_dotdir(m)) {
+ return 0;
+ }
+
if (!ls_perms_full(p, cmd, m, NULL)) {
return 0;
}
@@ -478,6 +483,11 @@
l[len] = '\0';
+ /* If the symlink points to either '.' or '..', skip it (Bug#3719). */
+ if (is_dotdir(l)) {
+ return 0;
+ }
+
if (!ls_perms_full(p, cmd, l, &hidden)) {
return 0;
}