Download Attachments You are not authorized

Please report bugs here!

Moderator: Thorsten

iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Download Attachments You are not authorized

Post by iconicperformances »

I have a very strange issue. I have one user out of the 124 users who when attempts to download an attachment receives the error message "You are not authorized".

I check the following:
  • That he is in the correct group.
  • That the group he is has the rights to download attachments. Answer = yes
  • That the user rights allows him to download attachments. Answer = yes
  • That the category has the correct group that he was in select as part of restricted group permissions. Answer = yes
  • That the FAQ has the correct group he was in as part of the FAQ restricted group permission. Answer = yes.

I even checked all the sub-categories and they all were correct.

But his account only would not allow him to download the attachment. He could access each category and sub-category and he could access the FAQ, but could not download the attachment.

After hours trying to find a solution, which I could not, I decided to add him to another user group, and when I did that, it worked and he was able to download the attachment.

Others in his original user group, did not have the problem he did.

What would be the reason for this.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

this is really interesting, thanks for the information you already provided. Did you tried different browsers? Did try it without any plugins in the browser?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

Tried on all browsers (Google, Firefox, Edge) also on smartphones (iPhone Safari) and Android’s google.

The same thing regardless of plugins on or off.

Keep in mind that when I change him into another group it works on all locations, but when in the original group it doesn’t.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

this is really strange. I already checked the code in this section and according to your bug report this issue makes no sense at all. I don't think it's possible to get a database dump?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

It is possible, if you can tell me, in detail how to do a database dump?
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

you can use the backup functionality of phpMyFAQ or a direct dump with a tool like phpMyAdmin.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

I have used the Backup Feature of phpMyFAQ. File was large so uploaded it on our Company DropBox Business Account.

However giving security of the file please use this link for access to the file. It is a private note that after viewing will remove the details for other prying eyes.

https://privnote.com/5HS2RXMl#aio3WclEs
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

I downloaded the file, thanks.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
robin-masters
Posts: 40
Joined: Mon Aug 11, 2014 10:09 am

Re: Download Attachments You are not authorized

Post by robin-masters »

Hey there,

same issue here.

I create an entry/FAQ with an attachment with a user in the group "it" and for all users in the group "it" it`s possible to open\download the attachment. After it i want to share the entry/FAQ with an other group "fm" an select under group rights both groups "it" and "fm".

I login with a user in the group "fm" and i can see the entry/FAQ but can not open the attachment "you are not authorized".

If i choose access for all under group rights - it`s possible to open the attachment. :?:

The Group "fm" have the right to delete, change attachments and so on.
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

Sorry I cannot be of help. I am still waiting for a reply to my problem from Thornsten. It’s been awhile so since you are having the same problem a fix can be provided asap.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

you're both on 2.9, right?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
robin-masters
Posts: 40
Joined: Mon Aug 11, 2014 10:09 am

Re: Download Attachments You are not authorized

Post by robin-masters »

at Thorsten = yes

some technical informations:

PHPMyFAQ Version: phpMyFAQ 2.9.11
MySQL 5.7.24
Apache 2.4
PHP Version 7.0.32

All on ubuntu 16.04
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

Yes.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Download Attachments You are not authorized

Post by Thorsten »

Hi,

thanks for the detailed bug report. I managed to reproduce the issue. Please test this fix:

https://github.com/thorsten/phpMyFAQ/co ... 6d6065ace2

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
iconicperformances
Posts: 55
Joined: Fri Sep 15, 2017 8:49 am

Re: Download Attachments You are not authorized

Post by iconicperformances »

Hi Thornsten,
I did as you suggested and added those code changes to my part of the php files and it fixed the problem.

Thank you for your time and assistance.
Post Reply