Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public sharing does not work anymore with 10.2.0 when password is enforced #7245

Closed
lexo-mfleuti opened this issue Jun 15, 2019 · 11 comments
Closed
Assignees
Labels
Milestone

Comments

@lexo-mfleuti
Copy link

Expected behaviour

When the option "Enforce expiration date" is enabled the Windows client should automatically set the latest expiration date and create a valid public share link. This worked up until 10.2.0.

Actual behaviour

  • Creating a public share link directly via context menu: does not work at all
  • Creating a public share link via "share" dialog: does not work at all. The "expiration date" field is greyed out and cannot be activated - not even manually. Instead a red "expiration date is enforced" error message is shown from the beginning.

Steps to reproduce

  1. Enable this setting in OC Settings: Sharing > Enforce expiration date
  2. Right click on a file -> Select "ownCloud" within context menu
  3. Select "Share..." (Teilen...)
  4. Enjoy the show

Server configuration

Operating system:
Ubuntu 19.04 (GNU/Linux 5.0.0-16-generic x86_64)

Web server:
Apache/2.4.38 (Ubuntu)

Database: mysql Ver 15.1 Distrib 10.3.13-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version:
PHP 7.2.19-0ubuntu0.19.04.1 (cli) (built: Jun 4 2019 14:44:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.19-0ubuntu0.19.04.1, Copyright (c) 1999-2018, by Zend Technologies

ownCloud version:
10.2.0

Storage backend (external storage):
Local

Client configuration

Client version:
I tried 2.5.4 and 2.6.0alpha1 from here: https://owncloud.org/download/

OS language:
English

Installation path of client:
C:\Program Files (x86)\ownCloud
oc_error

@ckamm
Copy link
Contributor

ckamm commented Jun 16, 2019

@lexo-mfleuti So you're saying with server version 10.2.0 it starts failing?

@lexo-mfleuti
Copy link
Author

@ckamm Yes, we updated to 10.2.0 about 2-3 weeks ago and it's no longer working ever since.
There was an issue with this in client version 2.5.3 already which I reported and was solved shortly after in 2.5.4. But with 10.2.0 it's now failing completely. I cannot even set a date manually anymore.

@ckamm
Copy link
Contributor

ckamm commented Jun 16, 2019

Yes, it looks like the server no longer auto-fills the expiration date if it's required. :(

There was a similar issue with the password policy app that caused us to change how link share creation works (you can now edit attributes before creation). That will be available with the next 2.6.0 prerelease. Unfortunately there's another bug there I just discovered, so using the dailies doesn't work yet.

Nevertheless, this change breaks share creation for older clients and we'll need to speak with the server team (@michaelstingl - but wait for me to double-check tomorrow)

@lexo-mfleuti
Copy link
Author

Glad you found the error that quickly. Thank you very much for looking into it!

Though there must remain a very quick and simple way to share files with like 1 click. OwnClouds' primary purpose is sharing files. This needs to be extremely fast and easy. That's why I suggested this:
#7061 (comment)

@ckamm
Copy link
Contributor

ckamm commented Jun 16, 2019

@lexo-mfleuti Yes, the current quick link-share creation also assumes the server will fill in the expire date if it requires it, instead of erroring - that's why it's also broken by 10.2.0. I currently guess that there'll be a workaround for it in >=2.6.0, and the behavior may be reverted in future server releases to make older clients work again.

ckamm added a commit that referenced this issue Jun 17, 2019
Fixes the "Copy public link to clipboard" context menu action for newer
servers.

Previously the server would fill the expiration date for us, since
version 10.2.0 it reports and error. To workaround that the action now
always sends an expiration date if default expiration is enabled in
the settings.

For #7245
@ckamm ckamm added this to the 2.6.0 milestone Jun 17, 2019
ckamm added a commit that referenced this issue Jun 17, 2019
Fixes the "Copy public link to clipboard" context menu action for newer
servers.

Previously the server would fill the expiration date for us, since
version 10.2.0 it reports an error. To workaround that the action now
always sends an expiration date if default expiration is enabled in
the settings.

For #7245
@ckamm
Copy link
Contributor

ckamm commented Jun 17, 2019

QA: Check that the "Copy public link to clipboard" action works (creates share if necessary, sets it to clipboard) with and without the "Set default expiration date" and "Enforce expiration date" server sharing settings.

Need to restart client after changing server settings.

The option can't work yet if shares require a password.

@ckamm ckamm changed the title Bug | Windows - Public sharing does not work (anymore) when password is enforced Public sharing does not work anymore with 10.2.0 when password is enforced Jun 17, 2019
@patrickjahns
Copy link

patrickjahns commented Jun 17, 2019

@ckamm
Did you test with ownCloud versions < 10.2 ? Is this only broken on 10.2.0 or earlier?

@lexo-mfleuti
Copy link
Author

It worked up until 10.2.0. Though - to be honest - I'm not quite certain what the version was before. I think 10.1.0

@ckamm
Copy link
Contributor

ckamm commented Jun 18, 2019

@patrickjahns I think I started on version 10.1.0 where it worked, and it started failing with 10.2.0. That makes some sense since owncloud/core#34971 was merged for 10.2.0.

ckamm added a commit that referenced this issue Jun 18, 2019
Fixes the "Copy public link to clipboard" context menu action for newer
servers.

Previously the server would fill the expiration date for us, since
version 10.2.0 it reports an error. To workaround that the action now
always sends an expiration date if default expiration is enabled in
the settings.

For #7245
@ckamm ckamm added ReadyToTest QA, please validate the fix/enhancement and removed PR available labels Jun 18, 2019
@HanaGemela
Copy link
Contributor

6 scenarios were tested:

  1. "Copy public link to clipboard" action works without the "Set default expiration date" server sharing settings - works as expected

  2. "Copy public link to clipboard" action works with the "Set default expiration date" server sharing settings - works as expected

  3. "Copy public link to clipboard" action works with the "Set default expiration date" and the "Enforce expiration date" server sharing settings - still broken Public link not copied to clipboard when expiration date required  #7286

  4. "Create a new public link via ownCloud Sharing dialog" works without the "Set default expiration date" server sharing settings - works as expected

  5. "Create a new public link via ownCloud Sharing dialog" works with the "Set default expiration date" server sharing settings - works as expected

  6. "Create a new public link via ownCloud Sharing dialog" works with the "Set default expiration date" and the "Enforce expiration date" server sharing settings - works as expected

As this issue contains multiple bugs and some of them has been fixed, I'll close it and the remaining one will be tracked in the separate issue as mentioned above

@HanaGemela
Copy link
Contributor

HanaGemela commented Jul 22, 2019

Tested with 2.6.0alpha2 (build 12097), Windows 10, server 10.2.1 (stable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants