uber / ringpop-go

Scalable, fault-tolerant application-layer sharding for Go applications
http://www.uber.com
MIT License
835 stars 83 forks source link

[Hotfix] Fix forward header leaking #197

Closed thanodnl closed 7 years ago

thanodnl commented 7 years ago

We have found an issue when the ctx passed into a remote call is blindly passed in as a context to an outgoing call. Endpoints that are sharded via the ringpop adapter might accidentally leak the header indicating a forwarded message. When this happens subsequent requests to sharded endpoints might unintentionally not be sharded.

The fix proposed here will prevent leaking the forwarded header to the application by not setting the header if the call is made to a non remote endpoint, and secondly remove the forwarding header from the forwarded call before dispatching it to the implementation.

Still required: