Steps to reproduce:
- Enable secure media
- Create a new topic and drag media (pdf file would do nicely)
- Reply to your own topic with a copy-paste of the media (or just quote yourself)
Now you can observe that clicking on the original media attachment works fine, but clicking on the quoted/copied media link (even though it is the exact same link) leads to error page:
I suspect it might have to do with the referrer tag because that is the only difference.