-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-branch.go1.11-security] cmd/go/internal/get: reject Windows …
…shortnames as path components Change-Id: Ia32d8ec1fc0c4e242f50d8871c0ef3ce315f3c65 Reviewed-on: https://team-review.git.corp.google.com/c/370572 Reviewed-by: Dmitri Shuralyov <[email protected]>
- Loading branch information
Bryan C. Mills
committed
Dec 7, 2018
1 parent
8954add
commit 5aedc8a
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Paths containing windows short names should be rejected before attempting to fetch. | ||
! go get example.com/longna~1.dir/thing | ||
stderr 'trailing tilde and digits' | ||
! go get example.com/longna~1/thing | ||
stderr 'trailing tilde and digits' | ||
! go get example.com/~9999999/thing | ||
stderr 'trailing tilde and digits' | ||
|
||
# A path containing an element that is just a tilde, or a tilde followed by non-digits, | ||
# should attempt to resolve. | ||
! go get example.com/~glenda/notfound | ||
! stderr 'trailing tilde and digits' | ||
stderr 'unrecognized import path' | ||
|
||
! go get example.com/~glenda2/notfound | ||
! stderr 'trailing tilde and digits' | ||
stderr 'unrecognized import path' | ||
|
||
! go get example.com/~/notfound | ||
! stderr 'trailing tilde and digits' | ||
stderr 'unrecognized import path' |