fix: allow worktree directories through InstanceMiddleware access check#1506
Open
onnoink wants to merge 1 commit into
Open
fix: allow worktree directories through InstanceMiddleware access check#1506onnoink wants to merge 1 commit into
onnoink wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #1504
Type of change
What does this PR do?
Worktree 目录位于 Global.Path.data/worktree/ 下,不在服务器工作目录中。中间件
校验时只检查了 process.cwd(),导致 SDK client 通过 x-mimocode-directory header
携带 worktree 路径的请求被 403 拒绝。本 PR 在中间件校验中额外允许 worktree 根目
录下的路径。
How did you verify your code works?
本地 typecheck 通过,worktree 创建流程中 DirectoryAccessDenied 错误不再触发。
Checklist