Skip to content
Snippets Groups Projects
Commit 08978d76 authored by rswindell's avatar rswindell
Browse files

Verify that if the index.to field is non-zero or there's a to_ext header field,

that they match. This will catch a QWK networking bug in previous
Synchronet versions where the index.to was non-zero (the number of
the QWKnet node account), but there was no hdr.to_ext field, thus the index
could not be recreated from the information in the header (e.g. by fixsmb).
This was actually an intentional design decision at the time, but in hindsight,
it's a bug (the index file is not supposed to contain any unique information).
parent 46bff1ee
No related branches found
No related tags found
No related merge requests found
......@@ -437,7 +437,8 @@ int main(int argc, char **argv)
subjcrc++;
}
if(smb.status.attr&SMB_EMAIL
&& msg.from_ext && msg.idx.from!=atoi(msg.from_ext)) {
&& (msg.from_ext!=NULL || msg.idx.from)
&& (msg.from_ext==NULL || msg.idx.from!=atoi(msg.from_ext))) {
fprintf(stderr,"%sFrom extension mismatch\n",beep);
msgerr=TRUE;
if(extinfo)
......@@ -457,7 +458,8 @@ int main(int argc, char **argv)
fromcrc++;
}
if(smb.status.attr&SMB_EMAIL
&& msg.to_ext && msg.idx.to!=atoi(msg.to_ext)) {
&& (msg.to_ext!=NULL || msg.idx.to)
&& (msg.to_ext==NULL || msg.idx.to!=atoi(msg.to_ext))) {
fprintf(stderr,"%sTo extension mismatch\n",beep);
msgerr=TRUE;
if(extinfo)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment