When a user attaches a file the link comes through in my digest. I was able to fix the invalid link that was being sent by changing the "Force server URL settings" option from NO to YES as per another post. However, I'm still having a problem where the link although technically valid doesn't work. When the user clicks it they are redirected to a page and given the message "You are not authorised to download this attachment." This even occurs if the user is already logged in (for example in another tab). I've attached a screen shot to give you a better idea.
I suspect the problem might have to do with the link in the digest missing a session ID. An example of the link that is included in the digest is: http://msih.net/forum/download/file.php?id=24
If the user proceeds to click login then they lose the link and have to navigate all the way through the forum to find the file again...
Does anybody know a workaround? Hopefully this was a good description of the problem, I'm not an expert in phpBB or digests by any means!
Not authorized to download attachments via digest link - phpBB Digests
-
- Registered User
- Posts: 12
- Joined: Mon Apr 19, 2010 2:13 am
Re: Not authorized to download attachments via digest link
As an added note, I partially solved the problem. It seemed that my cookie settings were incorrect and therefore not allowing the links to work for users who were already logged in.
However, it's still a bit awkward for a user who isn't logged in in that they get the "You are not authorized..." message instead of a prompt for username/pass as is the behavior for if you click on a post.
Thanks!
However, it's still a bit awkward for a user who isn't logged in in that they get the "You are not authorized..." message instead of a prompt for username/pass as is the behavior for if you click on a post.
Thanks!
-
- Registered User
- Posts: 12
- Joined: Mon Apr 19, 2010 2:13 am
Re: Not authorized to download attachments via digest link
The problem may be that you have enabled secure downloads. I would check your settings in the ACP, Attachment settings and see if there are conflicts there, like IP blocking. You might want to review the logic in the function download_allowed in /downloads/file.php because it is likely triggered by this logic.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
-
- Registered User
- Posts: 4933
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
Re: Not authorized to download attachments via digest link
Everything is working so long as the user is logged in first. I checked and secure downloads are not enabled. I'll have to run through the logic in /file.php but just to clarify what I'm asking, do you think it's possible that phPBB would prompt the user to login (assuming they're not already) instead of just throwing up a not authorized message?
-
- Registered User
- Posts: 12
- Joined: Mon Apr 19, 2010 2:13 am
Re: Not authorized to download attachments via digest link
That may be what's happening. If it is, you might want to submit a feature request.
Odd no one else has had this problem, or at least bothered to report it.
Odd no one else has had this problem, or at least bothered to report it.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
-
- Registered User
- Posts: 4933
- Joined: Fri Aug 02, 2002 12:36 am
- Location: Florence, MA USA
Re: Not authorized to download attachments via digest link
I'm having a similar issue. Initially I was getting the error "You are not authorised to view, download or link from/to this site."
Then I disabled secure downloads and I received "You are not authorised to download this attachment". Same issue with having to log in first for it to download. Any thoughts appreciated.
Then I disabled secure downloads and I received "You are not authorised to download this attachment". Same issue with having to log in first for it to download. Any thoughts appreciated.
-
- Registered User
- Posts: 9
- Joined: Thu Feb 10, 2022 3:25 pm