Sanitize paths before evaluating access to route
This commit is contained in:
committed by
Kevin Minehart
parent
78ca78f5df
commit
89963aca1f
@@ -274,6 +274,14 @@ func TestDataSourceProxy_routeRule(t *testing.T) {
|
||||
err = proxy.validateRequest()
|
||||
require.NoError(t, err)
|
||||
})
|
||||
|
||||
t.Run("path with slashes and user is editor", func(t *testing.T) {
|
||||
ctx, _ := setUp()
|
||||
proxy, err := setupDSProxyTest(t, ctx, ds, routes, "//api//admin")
|
||||
require.NoError(t, err)
|
||||
err = proxy.validateRequest()
|
||||
require.Error(t, err)
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("plugin route with RBAC protection user is allowed", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user