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

Fix response log obfuscation #64

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

pedrobranco
Copy link
Collaborator

Closes #63.

@pedrobranco pedrobranco self-assigned this Feb 19, 2018
@pedrobranco pedrobranco force-pushed the bugfix/fix-response-log-obfuscation branch from cdb1d08 to c006435 Compare February 19, 2018 14:55
@pedrobranco pedrobranco requested review from joaopaulofonseca and removed request for ruimarinho February 21, 2018 11:37
@@ -49,17 +49,19 @@ function obfuscateResponse(request, instance) {
return;
}

request.body = JSON.parse(request.body);
Copy link
Owner

Choose a reason for hiding this comment

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

@pedrobranco shouldn't we be keeping the same string as before?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Owner

Choose a reason for hiding this comment

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

I suggest passing the parsed body as an argument instead of mutating request.body here. I would then stringify the resulting (mutated) body object at the end of the method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh sure.

@pedrobranco pedrobranco force-pushed the bugfix/fix-response-log-obfuscation branch from c006435 to 63043a1 Compare February 27, 2018 17:27
@joaopaulofonseca joaopaulofonseca merged commit 972270b into master Oct 25, 2018
@joaopaulofonseca joaopaulofonseca deleted the bugfix/fix-response-log-obfuscation branch October 25, 2018 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants