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

Clients do not get useful message if ToS not accepted #467

Open
tobiasKaminsky opened this issue Feb 2, 2021 · 4 comments
Open

Clients do not get useful message if ToS not accepted #467

tobiasKaminsky opened this issue Feb 2, 2021 · 4 comments

Comments

@tobiasKaminsky
Copy link
Member

  • set up ToS
  • try to sync with any client
  • see "access forbidden"
    --> user should have better description
@tobiasKaminsky
Copy link
Member Author

to reproduce:

  • reset ToS
  • ./occ config:app:set terms_of_service tos_on_public_shares --value '1'
  • (this should not be needed!)
  • see sometimes 403 or 404

@nickvergessen
Copy link
Member

So this needs some extending on the server so apps can even specify a reason. The biggest issue is this happens after a isCreatable call etc, so the storage wrapper returns a boolean and doesn't have an option for a reason or something.

@julien-nc
Copy link
Member

To make this a bit more difficult, the cache is sometimes used. If ToS are not signed, the CacheWrapper just changes the Node permissions:

$entry['permissions'] &= $this->mask;

In this case, it seems hard to pass detailed information.

I tried throwing a OCA\DAV\Connector\Sabre\Exception\Forbidden in CacheWrapper and StorageWrapper with an "informative" message. This is goes up to Sabre and the DAV response contains the message. @nickvergessen Is it a satisfying solution?

Only differences I could see with before:

  • listing user's root directory is not possible anymore
  • listing a subdirectory in files app with ToS not being signed leads to an infinite retry loop even if DAV response contains <o:retry xmlns:o="o:">false</o:retry>. Is the Files app supposed to avoid retrying according to DAV response retry value?

@nickvergessen
Copy link
Member

Well the functions are not supposed to throw. I guess it will break a lot of apps and other things when a "isCreatable" function call all of a sudden throws a Sabre exception.

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

No branches or pull requests

3 participants