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

add one more restriction on the length of exception #1990 #2006

Merged
merged 11 commits into from
Mar 6, 2023

Conversation

siyuniu-ms
Copy link
Contributor

No description provided.

@siyuniu-ms
Copy link
Contributor Author

for #1990

@siyuniu-ms siyuniu-ms marked this pull request as ready for review March 4, 2023 01:07
@@ -533,6 +533,12 @@ export class _ExceptionDetails implements IExceptionDetails, ISerializable {
_self.message = dataSanitizeMessage(logger, _formatMessage(exception || error, _self.typeName)) || strNotSpecified;
const stack = exception[strStackDetails] || _getStackFromErrorObj(exception);
_self.parsedStack = _parseStack(stack);

// after parsedStack is inited, iterate over each frame object, sanitize its assembly field
if (_self.parsedStack instanceof Array){
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have an isArray helper function that you can use here.
But, yes this looks like it would address the raised issue.
Please go ahead and create a test case for this

add a unit test
@siyuniu-ms siyuniu-ms added this to the 2.8.11 milestone Mar 6, 2023
@siyuniu-ms siyuniu-ms merged commit ed8b351 into master Mar 6, 2023
@siyuniu-ms siyuniu-ms deleted the exceed_length branch March 6, 2023 22:51
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.

None yet

2 participants