[PR #5634] [MERGED] SECURITY: prevent DeleteFilePost doing arbitrary deletion #17878

Closed
opened 2025-11-02 16:24:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5634
Author: @zeripath
Created: 1/4/2019
Status: Merged
Merged: 1/4/2019
Merged by: @jonasfranz

Base: release/v1.6Head: protect-delete-file


📝 Commits (1)

  • 4108d3c SECURITY: protect DeleteFilePost et al with cleanUploadFileName (#5631)

📊 Changes

1 file changed (+18 additions, -2 deletions)

View changed files

📝 routers/repo/editor.go (+18 -2)

📄 Description

Unfortunately a suitably malformed request to DeleteFilePost will allow arbitrary deletion. Further it was also possible to adjust the .git directories on editFilePost and UploadFilePost.


🔄 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/5634 **Author:** [@zeripath](https://github.com/zeripath) **Created:** 1/4/2019 **Status:** ✅ Merged **Merged:** 1/4/2019 **Merged by:** [@jonasfranz](https://github.com/jonasfranz) **Base:** `release/v1.6` ← **Head:** `protect-delete-file` --- ### 📝 Commits (1) - [`4108d3c`](https://github.com/go-gitea/gitea/commit/4108d3c2da6245ff7264a588c4fd4093ff4b9894) SECURITY: protect DeleteFilePost et al with cleanUploadFileName (#5631) ### 📊 Changes **1 file changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `routers/repo/editor.go` (+18 -2) </details> ### 📄 Description Unfortunately a suitably malformed request to DeleteFilePost will allow arbitrary deletion. Further it was also possible to adjust the .git directories on editFilePost and UploadFilePost. --- <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 16:24:33 -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#17878