Skip to content

Commit

Permalink
Fix path traversal vulnerability, issue #21
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Jun 21, 2022
1 parent fa2f5a7 commit 74aec43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unarr.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ func (a *Archive) Offset() int64 {

// Name returns the name of the current entry as UTF-8 string
func (a *Archive) Name() string {
return unarrc.EntryGetName(a.archive)
name, _ := filepath.Abs(unarrc.EntryGetName(a.archive))
return name
}

// RawName returns the name of the current entry as raw string
Expand Down

0 comments on commit 74aec43

Please sign in to comment.