INN commit: branches/2.5/nnrpd (list.c)
INN Commit
rra at isc.org
Sun Nov 15 09:20:34 UTC 2009
Date: Sunday, November 15, 2009 @ 01:20:34
Author: iulius
Revision: 8761
If ".\r\n" was put into motd.news, the result of LIST MOTD
was breaking the NNTP protocol.
Modified:
branches/2.5/nnrpd/list.c
--------+
list.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Modified: list.c
===================================================================
--- list.c 2009-11-15 09:20:20 UTC (rev 8760)
+++ list.c 2009-11-15 09:20:34 UTC (rev 8761)
@@ -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