Fix for header lines without a key
This commit is contained in:
parent
f5603a2527
commit
0a4b9a0a28
@ -42,9 +42,12 @@ v0.35.01 05-Jun-2002
|
|||||||
When creating uplink area requests the from aka used is now
|
When creating uplink area requests the from aka used is now
|
||||||
the aka defined in the group.
|
the aka defined in the group.
|
||||||
Removed several memory leaks again.
|
Removed several memory leaks again.
|
||||||
|
Fixed a bug when a news article was received with a header
|
||||||
|
line without a key value such as created by wrong configured
|
||||||
|
newsreaders.
|
||||||
|
|
||||||
mbfile:
|
mbfile:
|
||||||
Added -v commandline switch to supress virus checking for the
|
Added -v commandline switch to suppress virus checking for the
|
||||||
adopt and import commands. Use with great care.
|
adopt and import commands. Use with great care.
|
||||||
|
|
||||||
mbsebbs:
|
mbsebbs:
|
||||||
@ -242,7 +245,7 @@ v0.33.20 10-Feb-2002 - 04-Jun-2002
|
|||||||
anymore.
|
anymore.
|
||||||
When a converted email to news listserver message is processed
|
When a converted email to news listserver message is processed
|
||||||
that has a header line starting with X-MS-, the headerline is
|
that has a header line starting with X-MS-, the headerline is
|
||||||
supressed because there is no key for this header. This looks
|
suppressed because there is no key for this header. This looks
|
||||||
like a new kind of M$ standard. mbnews crashed on this one.
|
like a new kind of M$ standard. mbnews crashed on this one.
|
||||||
Fixed a small problem in magic filename testing.
|
Fixed a small problem in magic filename testing.
|
||||||
In rfc2ftn the Approved: header now becomes a kludge instead
|
In rfc2ftn the Approved: header now becomes a kludge instead
|
||||||
|
3
TODO
3
TODO
@ -44,9 +44,6 @@ mbfido:
|
|||||||
U: Code cleanup and make a structure in this program. Remove duplicate
|
U: Code cleanup and make a structure in this program. Remove duplicate
|
||||||
or similar functions.
|
or similar functions.
|
||||||
|
|
||||||
U: AreaMgr uplink mails use the default best aka instead of the aka
|
|
||||||
defined in that specific group.
|
|
||||||
|
|
||||||
N: Remove memory leak during toss. (It's ok for less 5000 messages for
|
N: Remove memory leak during toss. (It's ok for less 5000 messages for
|
||||||
each run).
|
each run).
|
||||||
|
|
||||||
|
@ -120,6 +120,13 @@ rfcmsg *parsrfc(FILE *fp)
|
|||||||
*/
|
*/
|
||||||
cur->key = xstrcpy(buffer);
|
cur->key = xstrcpy(buffer);
|
||||||
cur->val = xstrcpy((char *)" ");
|
cur->val = xstrcpy((char *)" ");
|
||||||
|
} else if ((p=strchr(buffer,':')) && (p > buffer)) {
|
||||||
|
/*
|
||||||
|
* Header line without information, don't add this one.
|
||||||
|
*/
|
||||||
|
Syslog('!', "Header line %s without key value", buffer);
|
||||||
|
cur->key = xstrcpy(buffer);
|
||||||
|
cur->val = xstrcpy((char *)" ");
|
||||||
} else {
|
} else {
|
||||||
Syslog('M', "Non-header line: \"%s\"",buffer);
|
Syslog('M', "Non-header line: \"%s\"",buffer);
|
||||||
cur->key = xstrcpy((char *)"X-Body-Start");
|
cur->key = xstrcpy((char *)"X-Body-Start");
|
||||||
|
@ -435,8 +435,13 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Syslog('-', "1");
|
||||||
|
|
||||||
if (newsmode) {
|
if (newsmode) {
|
||||||
|
|
||||||
|
// Syslog('-', "1a");
|
||||||
fprintf(ofp, "AREA:%s\n", msgs.Tag);
|
fprintf(ofp, "AREA:%s\n", msgs.Tag);
|
||||||
|
// Syslog('-', "1b");
|
||||||
} else {
|
} else {
|
||||||
if (fmsg->to->point != 0)
|
if (fmsg->to->point != 0)
|
||||||
fprintf(ofp, "\001TOPT %d\n", fmsg->to->point);
|
fprintf(ofp, "\001TOPT %d\n", fmsg->to->point);
|
||||||
@ -445,6 +450,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node,
|
fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node,
|
||||||
fmsg->from->zone, fmsg->from->net, fmsg->from->node);
|
fmsg->from->zone, fmsg->from->net, fmsg->from->node);
|
||||||
}
|
}
|
||||||
|
// Syslog('-', "1c");
|
||||||
fprintf(ofp, "\001MSGID: %s %08lx\n", MBSE_SS(fmsg->msgid_a),fmsg->msgid_n);
|
fprintf(ofp, "\001MSGID: %s %08lx\n", MBSE_SS(fmsg->msgid_a),fmsg->msgid_n);
|
||||||
if (fmsg->reply_s)
|
if (fmsg->reply_s)
|
||||||
fprintf(ofp, "\1REPLY: %s\n", fmsg->reply_s);
|
fprintf(ofp, "\1REPLY: %s\n", fmsg->reply_s);
|
||||||
@ -454,16 +460,17 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
fprintf(ofp, "\001TZUTC: %s\n", gmtoffset(Now));
|
fprintf(ofp, "\001TZUTC: %s\n", gmtoffset(Now));
|
||||||
fmsg->subj = oldsubj;
|
fmsg->subj = oldsubj;
|
||||||
if ((p = hdr((char *)"X-FTN-REPLYADDR",msg))) {
|
if ((p = hdr((char *)"X-FTN-REPLYADDR",msg))) {
|
||||||
// Syslog('n', "replyaddr 1 %s", p);
|
// Syslog('n', "replyaddr 1 %s", p);
|
||||||
hdrsize += 10+strlen(p);
|
hdrsize += 10+strlen(p);
|
||||||
fprintf(ofp,"\1REPLYADDR:");
|
fprintf(ofp,"\1REPLYADDR:");
|
||||||
kludgewrite(p,ofp);
|
kludgewrite(p,ofp);
|
||||||
} else if (replyaddr) {
|
} else if (replyaddr) {
|
||||||
// Syslog('n', "replyaddr 2");
|
// Syslog('n', "replyaddr 2");
|
||||||
hdrsize += 10+strlen(replyaddr);
|
hdrsize += 10+strlen(replyaddr);
|
||||||
fprintf(ofp,"\1REPLYADDR: ");
|
fprintf(ofp,"\1REPLYADDR: ");
|
||||||
kludgewrite(replyaddr,ofp);
|
kludgewrite(replyaddr,ofp);
|
||||||
}
|
}
|
||||||
|
// Syslog('-', "2");
|
||||||
if ((p = hdr((char *)"X-FTN-REPLYTO",msg))) {
|
if ((p = hdr((char *)"X-FTN-REPLYTO",msg))) {
|
||||||
hdrsize += 8+strlen(p);
|
hdrsize += 8+strlen(p);
|
||||||
fprintf(ofp,"\1REPLYTO:");
|
fprintf(ofp,"\1REPLYTO:");
|
||||||
@ -506,7 +513,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
fprintf(ofp, "\001PID: MBSE-FIDO %s\n", VERSION);
|
fprintf(ofp, "\001PID: MBSE-FIDO %s\n", VERSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Syslog('-', "3");
|
||||||
hdrsize += 8 + strlen(getchrs(outcode));
|
hdrsize += 8 + strlen(getchrs(outcode));
|
||||||
fprintf(ofp, "\001CHRS: %s\n", getchrs(outcode));
|
fprintf(ofp, "\001CHRS: %s\n", getchrs(outcode));
|
||||||
if (html_message) {
|
if (html_message) {
|
||||||
@ -597,6 +604,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
kludgewrite(tmp->val,ofp);
|
kludgewrite(tmp->val,ofp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Syslog('-', "4");
|
||||||
/*
|
/*
|
||||||
* Add the Received: header from this system to the mesage.
|
* Add the Received: header from this system to the mesage.
|
||||||
*/
|
*/
|
||||||
@ -618,7 +626,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
kludgewrite(hdrconv(tmp->val, incode, outcode),ofp);
|
kludgewrite(hdrconv(tmp->val, incode, outcode),ofp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Syslog('-', "5");
|
||||||
rfcheaders=0;
|
rfcheaders=0;
|
||||||
for (tmp=msg;tmp;tmp=tmp->next) {
|
for (tmp=msg;tmp;tmp=tmp->next) {
|
||||||
if ((needputrfc(tmp) > 1)) {
|
if ((needputrfc(tmp) > 1)) {
|
||||||
@ -644,6 +652,8 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
|||||||
// free(replyaddr); /* Gives SIGSEGV */
|
// free(replyaddr); /* Gives SIGSEGV */
|
||||||
replyaddr = NULL;
|
replyaddr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Syslog('-', "6");
|
||||||
if (needsplit) {
|
if (needsplit) {
|
||||||
fprintf(ofp," * Continuation %d of a split message *\n\n", splitpart);
|
fprintf(ofp," * Continuation %d of a split message *\n\n", splitpart);
|
||||||
needsplit = FALSE;
|
needsplit = FALSE;
|
||||||
|
Reference in New Issue
Block a user