mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
importverifier: fix isPathUnder for base == path
This commit is contained in:
parent
7f991a3b53
commit
acbe87d65f
@ -110,7 +110,7 @@ func isPathUnder(base, path string) (bool, error) {
|
||||
|
||||
// if path is below base, the relative path
|
||||
// from base to path will not start with `../`
|
||||
return !strings.HasPrefix(relPath, "."), nil
|
||||
return !strings.HasPrefix(relPath, ".."), nil
|
||||
}
|
||||
|
||||
// forbiddenImportsFor determines all of the forbidden
|
||||
|
Loading…
Reference in New Issue
Block a user