mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 12:01:07 -08:00
fix(font): prevent zipslip attacks
This commit is contained in:
parent
4aba8fa9db
commit
08c37417a2
|
@ -35,6 +35,12 @@ func InstallZIP(data []byte, user bool) ([]string, error) {
|
|||
fonts := make(map[string]*Font)
|
||||
|
||||
for _, zf := range zipReader.File {
|
||||
// prevent zipslip attacks
|
||||
// https://security.snyk.io/research/zip-slip-vulnerability
|
||||
if strings.Contains(zf.Name, "..") {
|
||||
continue
|
||||
}
|
||||
|
||||
rc, err := zf.Open()
|
||||
if err != nil {
|
||||
return families, err
|
||||
|
|
Loading…
Reference in a new issue