mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(agent/agentcontext): canonicalize scan root in symlink boundary check (#26175)
This commit is contained in:
@@ -61,7 +61,7 @@ func TestAPI_ListSourcesEmpty(t *testing.T) {
|
||||
func TestAPI_AddAndListSource(t *testing.T) {
|
||||
t.Parallel()
|
||||
wd := t.TempDir()
|
||||
src := t.TempDir()
|
||||
src := testutil.TempDirResolved(t)
|
||||
|
||||
srv, _ := newAPITestServer(t, agentcontext.ManagerOptions{
|
||||
WorkingDir: func() string { return wd },
|
||||
@@ -103,7 +103,7 @@ func TestAPI_AddSourceRejected(t *testing.T) {
|
||||
func TestAPI_GetAndDeleteSource(t *testing.T) {
|
||||
t.Parallel()
|
||||
wd := t.TempDir()
|
||||
src := t.TempDir()
|
||||
src := testutil.TempDirResolved(t)
|
||||
|
||||
srv, m := newAPITestServer(t, agentcontext.ManagerOptions{
|
||||
WorkingDir: func() string { return wd },
|
||||
|
||||
Reference in New Issue
Block a user