Skip to content

server/utils.php: parse_smime: Undef variable '$inner_headers' #47

@umgfoin

Description

@umgfoin

l. 508 ff. function parse_smime($store, $message) refers variable $inner_headers, which is undefined.

mapi_setprops($message, [
                                PR_MESSAGE_CLASS => $props[PR_MESSAGE_CLASS],
                                PR_SENT_REPRESENTING_NAME => $props[PR_SENT_REPRESENTING_NAME],
                                PR_SENT_REPRESENTING_ENTRYID => $props[PR_SENT_REPRESENTING_ENTRYID],
                                PR_SENT_REPRESENTING_SEARCH_KEY => $props[PR_SENT_REPRESENTING_SEARCH_KEY],
                                PR_SENT_REPRESENTING_EMAIL_ADDRESS => $props[PR_SENT_REPRESENTING_EMAIL_ADDRESS] ?? '',
                                PR_SENT_REPRESENTING_SMTP_ADDRESS => $props[PR_SENT_REPRESENTING_SMTP_ADDRESS] ?? '',
                                PR_SENT_REPRESENTING_ADDRTYPE => $props[PR_SENT_REPRESENTING_ADDRTYPE] ?? 'SMTP',
                                PR_CLIENT_SUBMIT_TIME => $props[PR_CLIENT_SUBMIT_TIME] ?? time(),
                                PR_TRANSPORT_MESSAGE_HEADERS => ($props[PR_TRANSPORT_MESSAGE_HEADERS] ?? "") . $inner_headers,
                        ]);

Removing the variable, cures the obvious, but as there's another basic issue (#39) with smime-signed messages in g-web, a closer look might be worthy.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions