[PR #5272] [MERGED] Backport #5250 on v1.6: Fix Issue 5249 and protect /api/v1/admin routes with CSRF token #17732

Closed
opened 2025-11-02 15:23:20 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5272
Author: @zeripath
Created: 11/4/2018
Status: Merged
Merged: 11/4/2018
Merged by: @techknowlogick

Base: release/v1.6Head: issue-5249


📝 Commits (2)

  • f5b97f5 Add CSRF checking to reqToken and place CSRF in the post for deadline creation
  • f24778f /api/v1/admin/users routes should have reqToken middleware

📊 Changes

5 files changed (+32 additions, -10 deletions)

View changed files

📝 integrations/api_admin_test.go (+5 -5)
📝 integrations/git_test.go (+2 -1)
📝 modules/context/api.go (+13 -0)
📝 public/js/index.js (+4 -0)
📝 routers/api/v1/api.go (+8 -4)

📄 Description

This PR backports #5250 on to v1.6


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/5272 **Author:** [@zeripath](https://github.com/zeripath) **Created:** 11/4/2018 **Status:** ✅ Merged **Merged:** 11/4/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `release/v1.6` ← **Head:** `issue-5249` --- ### 📝 Commits (2) - [`f5b97f5`](https://github.com/go-gitea/gitea/commit/f5b97f546e61a9f69ad95ca4a50ec02796a4f0e6) Add CSRF checking to reqToken and place CSRF in the post for deadline creation - [`f24778f`](https://github.com/go-gitea/gitea/commit/f24778fe134ab6e4eb3cdbcad2d5534ceeeeddd5) /api/v1/admin/users routes should have reqToken middleware ### 📊 Changes **5 files changed** (+32 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `integrations/api_admin_test.go` (+5 -5) 📝 `integrations/git_test.go` (+2 -1) 📝 `modules/context/api.go` (+13 -0) 📝 `public/js/index.js` (+4 -0) 📝 `routers/api/v1/api.go` (+8 -4) </details> ### 📄 Description This PR backports #5250 on to v1.6 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 15:23:20 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17732