Skip to content
  • Alex Vandiver's avatar
    AddAttachments must use $RT::SystemUser when searching for attachments to use · 14b8b16c
    Alex Vandiver authored
    c29107c6 changed AddAttachments to use the transaction's current user to
    search for which attachments to add to the outgoing mail.
    Unfortunately, this ignored the common case where the transaction's
    current user is an unprivileged user who does not have rights to see
    their own attachment.  This manifested itself as AdminCc emails not
    having attachments which were included with the original mail that
    triggered them, despite RT-Attach-Message being set.
    
    Revert the CurrentUser on the Attachments search to $RT::SystemUser, as
    it was pre- c29107c6.  This does not re-open the vulnerability, as
    (unlike the AddTicket functionality) the transaction creator can only
    cause attachments on their own transaction to be distributed.  While one
    route to fix this would be to modify RT::Attachments->Next to allow
    creators to always see their own attachments, such a change might have
    broader-reaching implications.
    
    Conflicts:
    
    	lib/RT/Action/SendEmail.pm
    14b8b16c