server icon indicating copy to clipboard operation
server copied to clipboard

Unexpected handling of share password

Open nickvergessen opened this issue 6 years ago • 17 comments

  1. Create a public link for an item
  2. Tick the "Password protect" Bildschirmfoto von 2020-01-14 14-48-26
  3. Tick expiration date or video verification
  4. It looks like the password is set Bildschirmfoto von 2020-01-14 14-48-33
  5. Close and reopen the drop down
  6. It still looks the same
  7. Access the link you are not asked for a password
  8. Reload the share setting page
  9. The link has no password set

cc @skjnldsv

nickvergessen avatar Jan 14 '20 13:01 nickvergessen

I can confirm that behavior with Nextcloud 18.0.1 and Talk 8.0.4 and Firefox 73.0. As soon as I check the "Video Verification" checkbox, a "Error updating the share" message is shown on the screen.

20200214_nc_video_verification

An other user has also reported the described behavior:

https://help.nextcloud.com/t/switching-on-the-video-verification-fails-and-leads-to-the-failure-of-the-password-protection/71120/6

j-ed avatar Feb 14 '20 14:02 j-ed

I am also having issues with this on 2 seperate nextcloud instances runnung 18.0 and 18.0.1. When trying to set a custom password for a shared link I get the same result as j-ed, "Error updating the share"

edit: no hint on problems in the nextcloud log edit: so my problem in retrospect is just a bad error message. if not obeying the rules of the password policy set int the security settings, the error message "Error updating the share" appears and is not really helpful for the problem

Ethendrel avatar Feb 17 '20 10:02 Ethendrel

@Ethendrel could you give us the error from the console? It would help us narrow it. It should display the password error message though, this was design to.

Open your console, reload your page and/or do the action leading to this issue and copy/paste the log in this thread.

How to access your browser console (Click to expand)

Chrome

  • Press either CTRL + SHIFT + J to open the “console” tab of the Developer Tools.
  • Alternative method:
    1. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
    2. Click the “console” tab.

Safari

  • Press CMD + ALT + I to open the Web Inspector.
  • See Chrome’s step 2. (Chrome and Safari have pretty much identical dev tools.)

IE9

  1. Press F12 to open the developer tools.
  2. Click the “console” tab.

Firefox

  • Press CTRL + SHIFT + K to open the Web console (COMMAND + SHIFT + K on Macs).
  • or, if Firebug is installed (recommended):
    1. Press F12 to open Firebug.
    2. Click on the “console” tab.

Opera

  1. Press CTRL + SHIFT + I to open Dragonfly.
  2. Click on the “console” tab.

skjnldsv avatar Feb 27 '20 12:02 skjnldsv

Seems to be similar to: https://github.com/nextcloud/server/issues/19525, https://github.com/nextcloud/server/issues/19675 (with server response)

kesselb avatar Feb 27 '20 14:02 kesselb

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Mar 28 '20 14:03 ghost

I have this error on a Nextcloud 18.0.4. If I click on "allow edit" the same error "Error updating the share" is shown. "forced password" is on or off - no impact.

screenshot console: screen

I don't see any corresponding log in error.log or access.log. There is no "error 400" in these files. Any ideas?

linuxuser424 avatar Apr 27 '20 11:04 linuxuser424

@linuxuser424 I will need a screenshot of your network requests. Before you do anything, still on the development tools, there is a tab called network. Click on it and then the xhr filter. Do your action and screenshot the network log like this: capture d ecran_2018-09-27_21-49-46

skjnldsv avatar Apr 27 '20 11:04 skjnldsv

Thanks, here is the screenshot:

screen2

linuxuser424 avatar Apr 27 '20 11:04 linuxuser424

Please click the 400 failing request (bottom), select the repsonse tab, and copy/paste the results here

skjnldsv avatar Apr 27 '20 11:04 skjnldsv

Thank you, there is this message:

{"ocs":{"meta":{"status":"failure","statuscode":400,"message":"Public upload is not allowed"},"data":[]}}

Yes, public upload is not allowed. I thought public means everyone can upload (even without password). But if I enable password-protection this would not be public, so this config-option may be confusing.

The documentation says "Check 'Allow public uploads' to allow anyone to upload files to public shares." Well, anyone should not be enabled to upload - only someone with the correct password or account ;-)

Maybe it is just me and my understanding: If I look at the config options and documentation, it is not clear for me: are these options "and" (cumulative) or are they "or" (exclusive, first match is taken: then would the password be ignored).

Nevertheless: After activating "pulic upload" in options, I can save the files sharing option successfully. Thank you very much.

linuxuser424 avatar Apr 27 '20 12:04 linuxuser424

I think this is not about the password. Can you screenshot the sharing menu (where you enter the password) ? So I can have a look at what you're selecting?

Capture d’écran_2020-04-27_14-44-00 Were you selecting one of the two last permissions? (upload+edit or uploadonly) ?

skjnldsv avatar Apr 27 '20 12:04 skjnldsv

Yes, you are right: is not about the password (as I said above). This config option (as administrator):

screen4

Only if this option is activated, i can save with this sharing menu - with and without password (with deactivated forced password above).

screen3

linuxuser424 avatar Apr 27 '20 13:04 linuxuser424

Only if this option is activated, i can save with this sharing menu - with and without password (with deactivated forced password above).

You're not doing this on a folder, but on a single file?

skjnldsv avatar Apr 27 '20 13:04 skjnldsv

You're not doing this on a folder, but on a single file?

My screenshots are from a single file. Just tested: it makes no difference file/directory. If the admin-option "allow public uploads" is not active, there comes the error "Error updating the share".

linuxuser424 avatar Apr 27 '20 13:04 linuxuser424

Can you open a new issue with all those data please? :)

skjnldsv avatar Apr 27 '20 13:04 skjnldsv

Can you open a new issue with all those data please? :)

I think the issue is solved - or is just a documentation issue. Why not reopen this one? So it is clear, I was not the only one with this configuration.

linuxuser424 avatar Apr 27 '20 13:04 linuxuser424

Because yours is different. You shouldn't have to enable the allow upload for it to work. We should allow link shares without upload allowed. And let me add that upload permissions only make sense to folder, as you cannot upload into a file. Permissions are different :)

skjnldsv avatar Apr 27 '20 13:04 skjnldsv