Don't pass te to backends

This commit is contained in:
Jeff Mitchell 2018-06-08 17:53:28 -04:00
parent 7a3ef20c5a
commit 6ec09a09f4

View File

@ -485,6 +485,9 @@ func (r *Router) routeCommon(ctx context.Context, req *logical.Request, existenc
}
}
reqTokenEntry := req.TokenEntry()
req.SetTokenEntry(nil)
// Reset the request before returning
defer func() {
req.Path = originalPath
@ -506,6 +509,8 @@ func (r *Router) routeCommon(ctx context.Context, req *logical.Request, existenc
req.MountAccessor = re.mountEntry.Accessor
req.EntityID = originalEntityID
req.SetTokenEntry(reqTokenEntry)
}()
// Invoke the backend