mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-26 20:54:08 +00:00
importverifier: fix isPathUnder for base == path
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user