Closed lioulbehailu closed 3 years ago
@lioulbehailu Was your guess correct? Im concerned with this too since it uses a static namespace
I found this from cls-hooked
Values are grouped into namespaces, created with createNamespace(). Sets of function calls are grouped together by calling them within the function passed to .run() on the namespace object. Calls to .run() can be nested, and each nested context this creates has its own copy of the set of values from the parent context. When a function is making multiple asynchronous calls, this allows each child call to get, set, and pass along its own context without overwriting the parent's.
It seems like the nested context will have its own copy
if i share the user permission object with the same name like so
httpContext.set('permission', permission);
and if concurrent requests reach the express server, wont't this same the permission object to the unintended user due to