This issue was revealed after
MSGCNTR-585 was fixed. The names of hidden students (via the privacy tool) are now visible in the body of messages that are forwarded to email accounts (in the "To" information). Looking through some history, I suspect this "hidden" logic was inadvertently changed via SAK-14392. Previously, I think the logic created the message body for each individual recipient and then sent the email individually. This was grossly inefficient, so the code now creates the message body once and sends that to all of the recipients. Thus, if someone with privileges to view the hidden students sends the message, it is using that user's privileges to put together the body of the message.
As a solution, we will no longer display the hidden users in the "To" information. If there are "hidden" recipients of this message, we will append "and undisclosed recipients" to the end of the recipient information.