Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

proxy logs "no user in context" at error level for every data gateway download

Closed Beginner friendly
#13,101 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@paul43210 is already working on this.

Since Oct 9, 2026.

  • #13102 by @paul43210 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
backend

Research direction

Start with services/proxy/pkg/middleware/create_home.go, especially shouldServe and the branch that logs when the request context has no user. Trace how the /data route reaches this middleware and run the relevant proxy middleware tests. Done when these downloads pass through without an error-level “no user in context” log, while requests that need home creation still behave correctly.

Written by the indexing model from the issue text.

Description

Describe the bug

The proxy logs {"level":"error","service":"proxy","message":"no user in context"} for every file download that goes through the data gateway. Nothing fails, but on a busy instance these lines make up most of the error log.

Cause

services/proxy/pkg/middleware/create_home.go runs for any request that carries an x-access-token header (shouldServe). When there is no user in the request context, it logs at error level and passes the request on.

reva's internal download requests to the data gateway go through the proxy's /data route, which is unprotected. reva's HTTP client (rhttp.NewRequest) copies the caller's token into x-access-token, but no authenticator resolves a user on that route. So create_home sees a token without a user, logs the error, and the download carries on normally.

Steps to reproduce
curl -H 'x-access-token: x' http://127.0.0.1:9200/data/anything

The proxy logs one no user in context error (the request is then rejected by the data gateway, as expected). Real downloads (sync clients, the web UI, search content extraction) log one each. On our 8.2.0 instance that came to 200–800 a day, with peaks on re-indexing days.

Expected behaviour

There is no home to create for these requests, so the middleware should pass them on without an error-level log.

Dominant language
Go
Stars
2.1k
Forks
277
Avg merge
2d 2h
Merged PRs (30d)
126

Getting set up

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.

More from owncloud/ocis

All issues in owncloud/ocis

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.