You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm reading this right, this helper is responsible for identifying if a delegation pattern matches a target path. However, it incorrectly says a pattern like foo/* does not match foo/bar/foobar.txt. The same pattern does correctly match foo/foobar.txt. This is because both the pattern and the target path are split into their components using the separator, and if they don't have the same number of components, the helper returns false.
The implementation for this helper is here:
go-tuf/metadata/metadata.go
Lines 535 to 554 in 9d57731
If I'm reading this right, this helper is responsible for identifying if a delegation pattern matches a target path. However, it incorrectly says a pattern like
foo/*
does not matchfoo/bar/foobar.txt
. The same pattern does correctly matchfoo/foobar.txt
. This is because both the pattern and the target path are split into their components using the separator, and if they don't have the same number of components, the helper returns false.See: https://go.dev/play/p/6Mswjm_fM-4
The text was updated successfully, but these errors were encountered: