From 6d0bf438e302afcb0db5422ea2da59d1995e08c1 Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Wed, 9 Nov 2022 17:49:44 -0800 Subject: path/filepath: add IsLocal IsLocal reports whether a path lexically refers to a location contained within the directory in which it is evaluated. It identifies paths that are absolute, escape a directory with ".." elements, and (on Windows) paths that reference reserved device names. For #56219. Change-Id: I35edfa3ce77b40b8e66f1fc8e0ff73cfd06f2313 Reviewed-on: https://go-review.googlesource.com/c/go/+/449239 Run-TryBot: Damien Neil Reviewed-by: Joseph Tsai TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Joedian Reid --- api/next/56219.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 api/next/56219.txt (limited to 'api') diff --git a/api/next/56219.txt b/api/next/56219.txt new file mode 100644 index 0000000000..6379c06a2e --- /dev/null +++ b/api/next/56219.txt @@ -0,0 +1 @@ +pkg path/filepath, func IsLocal(string) bool #56219 -- cgit v1.3