Damien Neil a2d8157a7e archive/tar, archive/zip: return ErrInsecurePath for unsafe paths
Return a distinguishable error when reading an archive file
with a path that is:

	- absolute
	- escapes the current directory (../a)
	- on Windows, a reserved name such as NUL

Users may ignore this error and proceed if they do not need name
sanitization or intend to perform it themselves.

Fixes #25849
Fixes #55356

Change-Id: Ieefa163f00384bc285ab329ea21a6561d39d8096
Reviewed-on: https://go-review.googlesource.com/c/go/+/449937
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2022-11-16 23:36:48 +00:00
..
2022-08-15 19:17:20 +00:00
2022-08-25 18:50:37 +00:00
2022-10-15 17:02:11 +00:00
2022-09-19 17:10:49 +00:00
2022-08-26 17:15:08 +00:00
2022-08-17 18:47:33 +00:00
2022-08-23 18:24:30 +00:00
2022-11-09 22:23:18 +00:00
2022-11-04 14:19:00 +00:00
2022-11-02 18:15:21 +00:00
2022-11-16 23:17:58 +00:00