nextcloud / nextcloud/terms_of_service

[Bug] Public share viewer hits /sign instead of /sign_public, throws NotLoggedInException

Open
#1,201 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40
Forks
23
Avg merge
3d 3h
Merged PRs (30d)
11

Description

NC 32.0.8.2,
terms_of_service 4.7.0,
tos_on_public_shares=1,
tos_for_users=0.
Anonymous viewer accepts ToS on a public share → frontend POSTs to /ocs/v2.php/apps/terms_of_service/sign instead of /sign_public. Backend controller has both signTerms (auth) and signTermsPublic (#[PublicPage]) methods correctly defined in lib/Controller/SigningController.php and appinfo/routes.php. Bundle js/UserApp-*.chunk.mjs contains both URLs but picks the wrong one for the anonymous flow.

After accepting terms of service, the Screen shows Operation Forbidden.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the anonymous public-share flow in the frontend bundle UserApp-*.chunk.mjs, then compare its endpoint selection with signTerms and signTermsPublic in lib/Controller/SigningController.php and the routes in appinfo/routes.php. Verify that accepting the terms posts to /ocs/v2.php/apps/terms_of_service/sign_public for anonymous viewers and no longer shows Operation Forbidden.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.