fix: block sensitive symlink targets
This commit is contained in:
@@ -101,6 +101,9 @@ func rejectSymlinkEscape(home string, candidate string) error {
|
||||
if !isInside(evaluatedHome, currentEvaluated) {
|
||||
return ErrOutsideCodexHome
|
||||
}
|
||||
if IsForbidden(currentEvaluated, evaluatedHome) {
|
||||
return ErrForbiddenPath
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user