Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Prevent repo rename/move via the path-less /move and /copy endpoints

未关闭
#305 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
javascript
领域
api

调研方向

首先定位 POST /move/{org}/{repo} 和 POST /copy/{org}/{repo} 的处理器,然后检查当前如何处理没有仓库子路径的请求。添加覆盖,确保以 4xx 拒绝针对仓库根目录的 move 和 copy 请求,同时保持特定路径操作正常工作。da.live UI 的重命名操作在 adobe/da-live#1121 中单独跟踪。

由索引模型根据 Issue 内容生成。

描述

What

POST /move/{org}/{repo} and POST /copy/{org}/{repo} with no path under the repo act on the whole repo. That is a repo rename or move. It sweeps every key in the repo, including version and audit history under .da-versions.

This form is not in the API docs. The docs say move and copy take a path. The da.live UI reaches it too: at the org level you can hit rename on a repo, and it runs.

Why prevent it

The blast radius is large and easy to trigger by accident from the UI.

Version history does not move cleanly. The moved history keeps pointing at the old repo. With #303 blocking .da-versions destinations, a repo-root move now drops version history instead of carrying it.

Proposed fix

Reject a repo-root move or copy, a request whose source is the repo root with no sub-path. Return a 4xx. This is the authoritative gate. It covers every client: the da.live browse UI, Experience Workspace, and direct API calls.

Removing the matching repo rename action in the da.live UI is the companion issue: adobe/da-live#1121.

主要语言
JavaScript
星标
6
派生
18
平均合并
5 小时 46 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

adobe/da-admin 的其他 Issue

查看 adobe/da-admin 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。