nextcloud / nextcloud/terms_of_service
[Bug] Public share viewer hits /sign instead of /sign_public, throws NotLoggedInException
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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