phpList / phplist3

Fully functional Open Source email marketing manager for creating, sending, integrating, and analysing email campaigns and newsletters.
https://www.phplist.org
GNU Affero General Public License v3.0
744 stars 269 forks source link

Add a hook to allow plugins to download attachments #1018

Open lwcorp opened 8 months ago

lwcorp commented 8 months ago

viewinbrowser relies on dl.php to download attachments, which requires `&uid=$uid. While this makes perfect sense for e-mail, it cripples the notion of attachments in archives. I mean, there's no sense to see an archive if the whole purpose of the mail was its attachments.

Could you find a way to bypass the protection for certain cases? It could be a special exception for this specific plugin, like changing: if (isset($_GET['uid'])) and if (empty($userid)) to if (...|| (viewinbrowser is used && getConfig('viewbrowser_anonymous')) && getConfig('viewbrowser_anonymous_attachments'))))

Or maybe a more general approach.