mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
Merge pull request #54558 from sttts/sttts-fix-zero-case-import-verifier
Automatic merge from submit-queue (batch tested with PRs 54537, 54558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. importverifier: fix isPathUnder for base == path isPathUnder returned false for base == path, but should return true.
This commit is contained in:
commit
94acd5a076
@ -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