forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bundle: Replace HasPrefix in erasePolicy (open-policy-agent#3863)
Using HasPrefix to compare a root path to the path of policy can result in unexpected behaviour when different bundles have similarly named roots. This replaces the HasPrefix comparison with a comparison that treats the paths as directories and checks if the policy path is the same path as the root or a subdirectory of the root path, using an existing helper. Signed-off-by: Edward Paget <edward.paget@chime.com> Signed-off-by: Dolev Farhi <farhi.dolev@gmail.com>
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
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