Standard library / archive/zip

archive/zip.ErrInsecurePath

Non-local entry or backslash warning with zipinsecurepath=0. Reject it; additional extraction checks remain necessary. Example classifies a wrapped sentinel. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var ErrInsecurePath error

Working Example

Example Snippetgo
package main
import (  "archive/zip"  "errors"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() {  e := fmt.Errorf("archive: %w", zip.ErrInsecurePath)  fmt.Println(errors.Is(e, zip.ErrInsecurePath))}
Go Reference