]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] path/filepath: don't discard .. in EvalSymlinks
authorIan Lance Taylor <iant@golang.org>
Fri, 1 Mar 2019 20:31:18 +0000 (12:31 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 5 Mar 2019 03:53:52 +0000 (03:53 +0000)
commit0ea746023f4c6ce9d889e521af8756de0c9674e4
tree1f7ab4d6d6c21e4eb0e7e840dfbbd460fb053648
parent6ff06c19fd54d844b1963cf0ecfef6062d36611b
[release-branch.go1.12] path/filepath: don't discard .. in EvalSymlinks

EvalSymlinks was mishandling cases like "/x/../../y" or "../../../x"
where there is an extra ".." that goes past the start of the path.

Updates #30520
Fixes #30586

Change-Id: I07525575f83009032fa1a99aa270c8d42007d276
Reviewed-on: https://go-review.googlesource.com/c/go/+/164762
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit 294edb272d5d145665bdf8b4254609eae0363a8d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/165197
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/path/filepath/path_test.go
src/path/filepath/symlink.go