Hi all,
I've reached some complexity in refactoring acs-mail-lite, and would like your input on how to approach resolving.
Currently, notifications and acs-mail-lite packages create headers that are used to evaluate replies.
The reply headers can be used to:
1. validate than an email fits a pattern consistent with replies from outbound email.
2. return an object_id and type_id for use with callbacks.
At issue:
1. Although replies might fit a profile, they are not checked for a unique reference. This makes the process of faking a reply somewhat trivial. Also acs_mail_lite::valid_signature isn't used.
2. Internal references including object_id and type_id are sent in emails.
Does it make sense to pass a randomized external reference, much like a secure session cookie paradigm instead?
If so, I've created these procs for this purpose:
acs_mail_lite::message_id_create
acs_mail_lite::message_id_parse
acs_mail_lite::inbound_email_context
Details here: https://github.com/tekbasse/acs-mail-lite/blob/master/tcl/email-inbound-procs.tcl#L1464
Does it make sense to create an InboundEmailMode parameter in acs-mail-lite (or notifications), which would allow switching between existing paradigms and other paradigms, such as the IMAP one?
The parameter would be referenced by notifications package as well as acs-mail-lite. This means changes to notifications package will be submitted with revisions to acs_mail_lite.
If so, a switch would be added to existing message_id generators to plug a few anticipated vulnerabilities that would be opened up from integrating email replies into OpenACS packages.
Otherwise, it seems a proc that collects input from inbound email would have to check at least three different message_id types generated by Openacs in order authenticate --at least that the message_id is in proper form.
Your thoughts?
Ben