Commit 2b55a49f authored by rswindell's avatar rswindell
Browse files

The RECIPIENTLIST header field would get removed (converted to an RFC822TO

header field) when saving a message using the MsgBase class.
A similar problem existed with REPLYTOLIST/RFC822REPLYTO, but was not actually
observed.
Since the following header fields were not populated in the msg header
"field_list", if they existed in a message header that was modified using
the MsgBase class, they would be lost:
- RFC822TO
- RFC822CC
- RFC822ORG
- RFC822REPLYTO
- RFC822SUBJECT
parent ac4ee1bf
......@@ -186,9 +186,9 @@ static BOOL parse_recipient_object(JSContext* cx, private_t* p, JSObject* hdr, s
JS_ReportError(cx, "Invalid \"to_list\" string in recipient object");
return(FALSE);
}
if((smb_result = smb_hfield_str(msg, RFC822TO, cp))!=SMB_SUCCESS) {
if((smb_result = smb_hfield_str(msg, RECIPIENTLIST, cp))!=SMB_SUCCESS) {
free(cp);
JS_ReportError(cx, "Error %d adding RFC822TO field to message header", smb_result);
JS_ReportError(cx, "Error %d adding RECIPIENTLIST field to message header", smb_result);
goto err;
}
}
......@@ -617,8 +617,8 @@ static BOOL parse_header_object(JSContext* cx, private_t* p, JSObject* hdr, smbm
JS_ReportError(cx, "Invalid \"replyto_list\" string in header object");
goto err;
}
if((smb_result = smb_hfield_str(msg, RFC822REPLYTO, cp))!=SMB_SUCCESS) {
JS_ReportError(cx, "Error %d adding RFC822REPLYTO field to message header", smb_result);
if((smb_result = smb_hfield_str(msg, REPLYTOLIST, cp))!=SMB_SUCCESS) {
JS_ReportError(cx, "Error %d adding REPLYTOLIST field to message header", smb_result);
goto err;
}
}
......@@ -1539,7 +1539,12 @@ static JSBool js_get_msg_header_resolve(JSContext *cx, JSObject *obj, jsid id)
case FIDOSEENBY:
case FIDOPATH:
case RFC822HEADER:
case RFC822TO:
case RFC822CC:
case RFC822ORG:
case RFC822FROM:
case RFC822REPLYTO:
case RFC822SUBJECT:
case SMTPRECEIVED:
case UNKNOWNASCII:
/* only support these header field types */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment