You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next handler in the pipeline passed as a second parameter to the middleware is not safe to invoke multiple times. What actually Next handler is is defined at runtime and is not guaranteed to be stateless, which can lead to undefined behavior.
For example, middleware designed to invoke Next handler second time will cause unintented side effects if Fail2Ban middleware is then registered next in the pipeline.
If handler needs to be invoked multiple times, it should be selected explicitly and injected as a direct dependency (directly or lazy way or as a proxy to a middleware pipe elsewhere, etc).
Next
handler in the pipeline passed as a second parameter to the middleware is not safe to invoke multiple times. What actually Next handler is is defined at runtime and is not guaranteed to be stateless, which can lead to undefined behavior.For example, middleware designed to invoke Next handler second time will cause unintented side effects if Fail2Ban middleware is then registered next in the pipeline.
If handler needs to be invoked multiple times, it should be selected explicitly and injected as a direct dependency (directly or lazy way or as a proxy to a middleware pipe elsewhere, etc).
Originally posted by @Xerkus at zendframework/zend-stratigility#187
The text was updated successfully, but these errors were encountered: