nextcloud / nextcloud/notify_push
push checker uses wrong url for cookie - leads to 403
Nobody has claimed this yet.
- 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
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
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