linshare icon indicating copy to clipboard operation
linshare copied to clipboard

question about upload request function

Open matdemb opened this issue 4 years ago • 20 comments

Hi, when creating a collective upload, all users can see uploaded files but can they download files? When I test, if one of the guest upload a file, the second guest can see it, and have the download icon on it but when he try to download it he get a "authorization needed" image I try on PC Edge, Firefox, and on an android smartphone. Is there a way to give authorization to all guests to download all files (deletion works)?

matdemb avatar Aug 10 '22 09:08 matdemb

Hi, On which version of LinShare did you experienced this bug ? I've try to reproduce it and i can not. Every users of a collective upload requests are allowed to download files of any other user. Regards,

fmartin-linagora avatar Aug 10 '22 11:08 fmartin-linagora

I'm on 4.2.6. Error in logs: [ERROR]:http-nio-127.0.0.1-8080-exec-10:20220810.135743:org.linagora.linshare.webservice.interceptor.BusinessExceptionMapper:toResponse:A BusinessException was caught : code=UPLOAD_REQUEST_URL_FORBIDDEN, You do not have the right to get this upload request url : e8600604-37d9-4b1a-b27b-369c95424a95

matdemb avatar Aug 10 '22 11:08 matdemb

can you put the server in debug mode and then send me the logs ?

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

NB: i've tried to reproduce it on 4.2 and i did not faced any trouble.

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

in attachment the logs in debug for the noticed error. bug-linshare.txt

matdemb avatar Aug 11 '22 12:08 matdemb

Sorry, i should have written linshare in debug, not the whole server ! :)

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

Anyway, i think i know why. Can you confirm to me that your upload request is password protected ?

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

I thought more is better :-) . Yes the upload request is password protected.

matdemb avatar Aug 11 '22 12:08 matdemb

In the logs, it seems that the password is no the right one:

[ERROR]:http-nio-127.0.0.1-8080-exec-1:20220811.142511:org.linagora.linshare.webservice.interceptor.BusinessExceptionMapper:toResponse:A BusinessException was caught : code=UPLOAD_REQUEST_URL_FORBIDDEN,  You do not have the right to get this upload request url : e8600604-37d9-4b1a-b27b-369c95424a95
[DEBUG]:http-nio-127.0.0.1-8080-exec-1:20220811.142511:org.linagora.linshare.webservice.interceptor.BusinessExceptionMapper:toResponse:Stacktrace:
org.linagora.linshare.core.exception.BusinessException: You do not have the right to get this upload request url : e8600604-37d9-4b1a-b27b-369c95424a95
        at org.linagora.linshare.core.service.impl.UploadRequestUrlServiceImpl.accessBusinessCheckForChangePwd(UploadRequestUrlServiceImpl.java:206)
        at org.linagora.linshare.core.service.impl.UploadRequestUrlServiceImpl.accessBusinessCheck(UploadRequestUrlServiceImpl.java:198)
        at org.linagora.linshare.core.service.impl.UploadRequestUrlServiceImpl.find(UploadRequestUrlServiceImpl.java:119)

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

each link towards the UR has its own password.

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

it's the one that permit me to enter into the upload request. But it's not the one used to upload the file as it has been uploaded by an other user (with an other password). Each user has it's own password. The only file I can download is the one I ulpoad.

matdemb avatar Aug 11 '22 12:08 matdemb

I forgot to specify something, the download I try to do is on upload request interface with an other guest link/password, not with the "normal" linshare UI by the creator of the upload request.

matdemb avatar Aug 11 '22 12:08 matdemb

Yes, i get it. You have sender1 that create an upload request, protected by password, with two recipients: recipient1 and recipient2. Recipient1 follow his link and provide his password, then upload a file. And then in another session (private tab for example), recipient2 follow his link and provide his password, then try to download the previous file.

Am i right ?

fmartin-linagora avatar Aug 11 '22 12:08 fmartin-linagora

yes you're right. The file uploaded by sender 1 can't be downloaded by sender 2 but he can download it's own uploads (that is not very usefull but it works)

matdemb avatar Aug 11 '22 12:08 matdemb

I think you meant recipient 1 and recipient 2.

fmartin-linagora avatar Aug 11 '22 13:08 fmartin-linagora

yes true

matdemb avatar Aug 11 '22 13:08 matdemb

On my side, both recipients can not download the file.

fmartin-linagora avatar Aug 11 '22 13:08 fmartin-linagora

So, we find out what was the issue, it is more complicated that we thought. we will try to fix it for the LinShare 6.0.0 release planned in September.

fmartin-linagora avatar Aug 12 '22 12:08 fmartin-linagora

ok, thanks for the information

matdemb avatar Aug 12 '22 12:08 matdemb

Hello, I upgraded my server to 6.0.3 but the bug is still there )-; . Is there a roadmap to correct this? Kind regards,

matdemb avatar May 04 '23 09:05 matdemb