trying to subscribe to an issue before being logged in leads to a 404 after logging in #5643

Closed
opened 2025-11-02 06:31:44 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @igalic on GitHub (Jun 27, 2020).

  • Gitea version (or commit ref): the one on codeberg.org
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

i might ask folks from codeberg.org to fill this out for me

Description

(edit URL, press subscribe again)

Originally created by @igalic on GitHub (Jun 27, 2020). - Gitea version (or commit ref): the one on codeberg.org - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: i might ask folks from codeberg.org to fill this out for me ## Description - press the subscribe button on an issue https://codeberg.org/gitnex/GitNex/issues/28 - get forwarded to the login - login - including 2FA - get forwarded to codeberg.org/gitnex/GitNex/issues/28/watch which says 404 (edit URL, press subscribe again)
GiteaMirror added the type/enhancement label 2025-11-02 06:31:44 -06:00
Author
Owner

@rfwatson commented on GitHub (Jul 1, 2020):

I get the same after clicking the "Watch" or "Star" buttons on the repo page while logged out.

They all occur for the same reason:

  1. POST /username/repo/issues/1/watch returns 302 -> login page
  2. URL is stored in redirect_to cookie
  3. User logs in successfully
  4. GET /username/repo/issues/1/watch from the redirect returns 404 due to wrong method

As a first step, we could redirect the user back to the previous page after login and display a notification encouraging them to re-trigger the watch/star/whatever action manually? Or is there a slicker solution?

@rfwatson commented on GitHub (Jul 1, 2020): I get the same after clicking the "Watch" or "Star" buttons on the repo page while logged out. They all occur for the same reason: 1. `POST /username/repo/issues/1/watch` returns 302 -> login page 2. URL is stored in `redirect_to` cookie 3. User logs in successfully 4. `GET /username/repo/issues/1/watch` from the redirect returns 404 due to wrong method As a first step, we could redirect the user back to the previous page after login and display a notification encouraging them to re-trigger the watch/star/whatever action manually? Or is there a slicker solution?
Author
Owner

@a1012112796 commented on GitHub (Jul 1, 2020):

Hmm, in my opinion, Hide this button when the user is not login is enough. And that's what gihub do.example:
image

@a1012112796 commented on GitHub (Jul 1, 2020): Hmm, in my opinion, Hide this button when the user is not login is enough. And that's what gihub do.example: ![image](https://user-images.githubusercontent.com/25342410/86237419-501daa80-bbce-11ea-8a9a-17880ac58718.png)
Author
Owner

@stale[bot] commented on GitHub (Aug 31, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 31, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@igalic commented on GitHub (Aug 31, 2020):

dear stale (bot), i dunno what to tell you, if no one works on this it's gonna go stale (by your definition) that don't mean it's irrelevant

aaaaand, with my go skills withered, and my time very limited, i can't work on it

@igalic commented on GitHub (Aug 31, 2020): dear stale (bot), i dunno what to tell you, if no one works on this it's gonna go stale (by your definition) that don't mean it's irrelevant aaaaand, with my go skills withered, and my time very limited, i *can't* work on it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5643