Skip to content

fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity #7957

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

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 25, 2023

This is to avoid infinite recursion that we cannot detect, e.g. when using dynamic proxies.

Fixes #7947 (hopefully).

This is to avoid infinite recursion that we cannot detect, e.g. when using dynamic proxies.
@mydea mydea requested review from lforst and AbhiPrasad April 25, 2023 14:52
@mydea mydea self-assigned this Apr 25, 2023
@mydea mydea marked this pull request as ready for review April 26, 2023 07:23
@mydea mydea changed the title fix(utils): normalize() to a max. of 100 levels deep by default fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity Apr 26, 2023
Comment on lines +129 to +137
for (let i = 0; i < 99; i++) {
expect(last).toEqual(
expect.objectContaining({
name: expect.any(String),
child: expect.any(Object),
}),
);
last = last.child;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drastic times call for drastic measures

@lforst
Copy link
Contributor

lforst commented Apr 26, 2023

We should def put this in the changelog - maybe you can put a note there within this pr under a ## Unreleased heading

@mydea
Copy link
Member Author

mydea commented Apr 26, 2023

We should def put this in the changelog - maybe you can put a note there within this pr under a ## Unreleased heading

I added a changelog entry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replay: SDK is stuck in an infinite loop.
2 participants