[PR #5631] [MERGED] SECURITY: prevent DeleteFilePost doing arbitrary deletion #17877

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

📋 Pull Request Information

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

Base: masterHead: protect-delete-file


📝 Commits (1)

  • d87fcfc SECURITY: protect DeleteFilePost et al with cleanUploadFileName

📊 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/5631 **Author:** [@zeripath](https://github.com/zeripath) **Created:** 1/4/2019 **Status:** ✅ Merged **Merged:** 1/4/2019 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `protect-delete-file` --- ### 📝 Commits (1) - [`d87fcfc`](https://github.com/go-gitea/gitea/commit/d87fcfca1143cb3f1967ddaf1998a6b50dcb4a0f) SECURITY: protect DeleteFilePost et al with cleanUploadFileName ### 📊 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:02 -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#17877