Preserve artifact file identity and verify hashes
This commit is contained in:
@@ -98,7 +98,7 @@ func (r *restrictedArtifactReader) readFileArtifact(ref promptkit.ArtifactRef) (
|
||||
|
||||
// resolveLexicalPath checks cleaned path containment without resolving symlinks.
|
||||
func (r *restrictedArtifactReader) resolveLexicalPath(rawPath string) (string, error) {
|
||||
cleanPath := filepath.Clean(strings.TrimSpace(rawPath))
|
||||
cleanPath := filepath.Clean(rawPath)
|
||||
candidate := cleanPath
|
||||
if !filepath.IsAbs(cleanPath) {
|
||||
candidate = filepath.Join(r.root, cleanPath)
|
||||
|
||||
Reference in New Issue
Block a user