[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Muddleftpd-cvs] muddleftpd ./ChangeLog ./NEWS src/logger.c src/...
From: |
Beau Kuiper |
Subject: |
[Muddleftpd-cvs] muddleftpd ./ChangeLog ./NEWS src/logger.c src/... |
Date: |
Tue, 29 Oct 2002 00:01:39 -0500 |
CVSROOT: /cvsroot/muddleftpd
Module name: muddleftpd
Changes by: Beau Kuiper <address@hidden> 02/10/29 00:01:38
Modified files:
. : ChangeLog NEWS
src : logger.c string.c
Log message:
Fixed logging of /r /n properly
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/muddleftpd/muddleftpd/ChangeLog.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/muddleftpd/muddleftpd/NEWS.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/muddleftpd/muddleftpd/src/logger.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/muddleftpd/muddleftpd/src/string.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: muddleftpd/ChangeLog
diff -c muddleftpd/ChangeLog:1.3 muddleftpd/ChangeLog:1.4
*** muddleftpd/ChangeLog:1.3 Mon Oct 21 08:41:09 2002
--- muddleftpd/ChangeLog Tue Oct 29 00:01:38 2002
***************
*** 1,3 ****
--- 1,14 ----
+ 2002-10-29 Beau Kuiper <address@hidden>
+
+ * src/string.c: string_filterbadchars(): Added code to only allow
+ /r and /n characters if and only if they are together as a TELNET
+ newline (/r/n). This fixes the bug of muddleftpd accepting input
+ with those characters in it and then mucking the log files up with
+ it.
+
+ * src/logger.c: Removed code that replaces /r and /n with spaces.
+ It doesn't need it anymore, since I have cured the original bug.
+
2002-10-21 Joerg Jaspert <address@hidden>
* modules/auth/authlibexample/COPYING: Added back. This license
Index: muddleftpd/NEWS
diff -c muddleftpd/NEWS:1.1 muddleftpd/NEWS:1.2
*** muddleftpd/NEWS:1.1 Sun Oct 20 11:47:34 2002
--- muddleftpd/NEWS Tue Oct 29 00:01:38 2002
***************
*** 1,3 ****
--- 1,16 ----
+ Version 1.3.13:
+
+ 1) Change: Revamped build system to use new build tools.
+ 2) Change: Included authentication modules into build system.
+ 3) Bug Fix: Properly fixed bug in 1.3.12.1, so muddleftpd does not
+ accept /r or /n from user input unless it is the form of
+ a TELNET newline.
+
+ Version 1.3.12.1:
+
+ 1) Bug Fix: Fixed logging of /r and /n so they are converted to
+ spaces.
+
Version 1.3.12:
1) Bug Fix: Linux does not like custom PASV replies with ip-masq.
Index: muddleftpd/src/logger.c
diff -c muddleftpd/src/logger.c:1.3 muddleftpd/src/logger.c:1.4
*** muddleftpd/src/logger.c:1.3 Tue Oct 15 21:07:44 2002
--- muddleftpd/src/logger.c Tue Oct 29 00:01:38 2002
***************
*** 79,88 ****
outlen = strlen(outstring);
- for (i = 0 ; i < outlen-1 ; i++)
- if((outstring[i] == '\n') || (outstring[i] == '\r'))
- outstring[i] = 0x20;
-
writeresult = write(logoutfd, outstring, outlen);
if (writeresult != outlen)
--- 79,84 ----
Index: muddleftpd/src/string.c
diff -c muddleftpd/src/string.c:1.1 muddleftpd/src/string.c:1.2
*** muddleftpd/src/string.c:1.1 Thu Sep 26 03:55:42 2002
--- muddleftpd/src/string.c Tue Oct 29 00:01:38 2002
***************
*** 84,90 ****
pos1 = pos2 = STRTOCHAR(*s) + start;
slen = STRLENGTH(*s);
! for(count = start; count < slen; count++)
{
/* be very aggressive. Only printable charaters! */
if ((*pos1 >= 32) && (*pos1 <= 126))
--- 84,92 ----
pos1 = pos2 = STRTOCHAR(*s) + start;
slen = STRLENGTH(*s);
! count = start;
!
! while(count < slen)
{
/* be very aggressive. Only printable charaters! */
if ((*pos1 >= 32) && (*pos1 <= 126))
***************
*** 96,103 ****
{
switch(*pos1)
{
- case '\n':
case '\r':
case '\t':
*pos2 = *pos1;
pos2++;
--- 98,116 ----
{
switch(*pos1)
{
case '\r':
+ /* allow specific case of \r\n only. */
+ if (count != (slen - 1))
+ if (*(pos1 + 1) == '\n')
+ {
+ // forward 2 chars
+ *pos2 = *pos1;
+ *(pos2 + 1) = *(pos1 +
1);
+ pos1++;
+ pos2 += 2;
+ count++;
+ }
+ break;
case '\t':
*pos2 = *pos1;
pos2++;
***************
*** 108,113 ****
--- 121,127 ----
}
}
pos1++;
+ count++;
}
*pos2 = 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Muddleftpd-cvs] muddleftpd ./ChangeLog ./NEWS src/logger.c src/...,
Beau Kuiper <=