INN commit: trunk/nnrpd (list.c)
INN Commit
rra at isc.org
Sat Oct 24 09:45:41 UTC 2009
Date: Saturday, October 24, 2009 @ 02:45:41
Author: iulius
Revision: 8685
If ".\r\n" was put into motd.news, the result of LIST MOTD
was breaking the NNTP protocol.
Modified:
trunk/nnrpd/list.c
--------+
list.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Modified: list.c
===================================================================
--- list.c 2009-10-24 09:31:02 UTC (rev 8684)
+++ list.c 2009-10-24 09:45:41 UTC (rev 8685)
@@ -255,14 +255,15 @@
/* Read lines, ignore long ones. */
while ((p = QIOread(qp)) != NULL) {
- if (lp == &INFOmotd) {
- Printf("%s\r\n", p);
- continue;
- }
- if (p[0] == '.' && p[1] == '\0') {
- syslog(L_ERROR, "%s single dot in %s", Client.host, lp->File);
- continue;
- }
+ /* Check that the output does not break the NNTP protocol. */
+ if (p[0] == '.' && p[1] == '\0') {
+ syslog(L_ERROR, "%s single dot in %s", Client.host, lp->File);
+ continue;
+ }
+ if (lp == &INFOmotd) {
+ Printf("%s\r\n", p);
+ continue;
+ }
/* Matching patterns against patterns is not that
* good but it is better than nothing... */
if (lp == &INFOdistribpats) {
More information about the inn-committers
mailing list