Skip to content

"enterWith" security concern is resolved in node 24? #402

@amrsalama

Description

@amrsalama

I think this PR in node 24 (nodejs/node#58029) resolved the security concern of "enterWith" in guard (and optionally in middleware initializers).

Tests:
Image

Maybe we should add notes about it as well?

Also in older versions (based on the examples in this PR as well), we can avoid the same issue with

const als = new AsyncLocalStorage();
als.enterWith(undefined); // Forcefully enable the AsyncLocalStorage.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions