"Bad Request: invalid CSRF token" when Updating branch by merge #10549

Closed
opened 2025-11-02 09:10:59 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @eNBeWe on GitHub (Mar 29, 2023).

Description

When clicking the "Update branch by merge" button in a pull request, I get dropped back to the main gitea page with a "Bad Request: invalid CSRF token" error message.

Gitea Version

1.19.0 as well as 1.19.0+28-g81a995cd8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

grafik
grafik

Git Version

2.25.1

Operating System

Ubuntu Linux 20.04.6

How are you running Gitea?

Installed from binaries with systemd service behind nginx reverse proxy.
Nginx-Config is the same as given in the docs.

Database

PostgreSQL

Originally created by @eNBeWe on GitHub (Mar 29, 2023). ### Description When clicking the "Update branch by merge" button in a pull request, I get dropped back to the main gitea page with a "Bad Request: invalid CSRF token" error message. ### Gitea Version 1.19.0 as well as 1.19.0+28-g81a995cd8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![grafik](https://user-images.githubusercontent.com/3796429/228487432-c4fc1f51-1293-4af9-b431-de7ce757c07b.png) ![grafik](https://user-images.githubusercontent.com/3796429/228487535-f053d5fc-806b-4f41-ac1c-5dbe96c72a2d.png) ### Git Version 2.25.1 ### Operating System Ubuntu Linux 20.04.6 ### How are you running Gitea? Installed from binaries with systemd service behind nginx reverse proxy. Nginx-Config is the same as given in the docs. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:10:59 -06:00
Author
Owner

@lunny commented on GitHub (Mar 29, 2023):

Whether you stay the page for a long time and click the button directly when you back?

@lunny commented on GitHub (Mar 29, 2023): Whether you stay the page for a long time and click the button directly when you back?
Author
Owner

@eNBeWe commented on GitHub (Mar 29, 2023):

Happens in either case

@eNBeWe commented on GitHub (Mar 29, 2023): Happens in either case
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2023):

Go to your Site Admin page, do you see any error/warning message on page?

@wxiaoguang commented on GitHub (Mar 29, 2023): Go to your Site Admin page, do you see any error/warning message on page?
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2023):

OK, I understand the problem now. A regression of #22683

@wxiaoguang commented on GitHub (Mar 29, 2023): OK, I understand the problem now. A regression of #22683
Author
Owner

@eNBeWe commented on GitHub (Mar 29, 2023):

For completeness: Nothing in the site admin pages.
But I guess that is kind of moot now, since you found the issue. Good job

@eNBeWe commented on GitHub (Mar 29, 2023): For completeness: Nothing in the site admin pages. But I guess that is kind of moot now, since you found the issue. Good job
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2023):

#23790 will fix the problem. Thank you for your report.

@wxiaoguang commented on GitHub (Mar 29, 2023): #23790 will fix the problem. Thank you for your report.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10549