nextcloud / nextcloud/notify_push

push checker uses wrong url for cookie - leads to 403

Open
#691 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
344
Forks
64
Avg merge
2d 10h
Merged PRs (30d)
5

Description

the command occ notify_push:setup http://nextcloud.url/push

produeces requests to

127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/cookie HTTP/1.1" 301 162 "-" "Nextcloud Server Crawler"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/cookie HTTP/1.1" 200 9 "-" "Nextcloud Server Crawler"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/mapping/1 HTTP/1.1" 301 162 "-" "Nextcloud Server Crawler"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/mapping/1 HTTP/1.1" 200 1 "-" "Nextcloud Server Crawler"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/reverse_cookie HTTP/1.1" 301 162 "-" "Nextcloud Server Crawler"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /index.php/apps/notify_push/test/cookie HTTP/1.1" 403 0 "-" "-"
127.0.0.1 - - [16/Mar/2026:15:04:01 +0100] "GET /push/test/reverse_cookie HTTP/1.1" 200 27 "-" "Nextcloud Server Crawler"

shouldn't the second cookie url be /push/test/cookie instead of /index.php/apps/notify_push/test/cookie

as the redirect only works for /push/

with a rewrite in nginx it validates the second cookie with 200

		location ^~ /index.php/apps/notify_push/test/cookie {
			rewrite ^ https://nextcloud.url/push/test/cookie permanent;
		}

probably because of
https://github.com/nextcloud/notify_push/blob/main/src/nc.rs#L88

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

Start with src/nc.rs at line 88 and trace how notify_push:setup builds the cookie-check URLs. Compare the logged /push/test/cookie and /index.php/apps/notify_push/test/cookie requests, then verify the corrected behavior using the setup command and confirm the cookie validation returns 200 without the nginx rewrite.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.