Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: parameters-extractor middleware is subject to race conditions #2328

Open
guillaumerochelle opened this issue Oct 23, 2024 · 0 comments
Labels
bug Something isn't working priority:medium

Comments

@guillaumerochelle
Copy link
Contributor

Package name

dynamic-content

Package version

11.3.0-rc.8

Reproduction steps

It's kinda hard to reproduce. We faced the issue running our e2e tests with multiple threads.

Basically we launch an express server with the middleware.
The e2e campaign shoots multiple POST requests at the same time (due to multiple threads).

Current result

Some requests get the post params from other requests. This is due to post params being saved in a global object here.
See here: let previousPostParams = {};

The next Content-Type: text/html request which arrives on the express server will have data-post attribute in the body tag populated with the post params.

Expected result

Refactor the middleware to not be subject to race conditions.

Additional comments

No response

@guillaumerochelle guillaumerochelle added bug Something isn't working triage labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants