mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 10:45:08 -06:00
02a3bf0ac4
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>