-
Notifications
You must be signed in to change notification settings - Fork 303
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
Use [REDACTED] instead of [SANITIZED] when cleaning errors #515
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,11 @@ describe('Errors', function() { | |
const sanitizedError = errors.sanitizeErrorRequestData(error); | ||
const sanitizedData = sanitizedError.response.request._data; | ||
|
||
it('should return [SANITIZED] for DATA_SECRET', function() { | ||
expect(sanitizedData.DATA_SECRET).to.equal('[SANITIZED]'); | ||
it('should return [REDACTED] for DATA_SECRET', function() { | ||
expect(sanitizedData.DATA_SECRET).to.equal('[REDACTED]'); | ||
}); | ||
it('should return [SANITIZED] for DATA_SECRET', function() { | ||
expect(sanitizedData.DATA_SECRET).to.equal('[SANITIZED]'); | ||
it('should return [REDACTED] for DATA_SECRET', function() { | ||
expect(sanitizedData.DATA_SECRET).to.equal('[REDACTED]'); | ||
}); | ||
it('should return original value for USER_NAME', function() { | ||
expect(sanitizedData.USER_NAME).to.equal(sanitizedData.USER_NAME); | ||
|
@@ -52,8 +52,8 @@ describe('Errors', function() { | |
const sanitizedError = errors.sanitizeErrorRequestData(error); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||
const sanitizedData = sanitizedError.response.request._header; | ||
|
||
it('should return [SANITIZED] for authorization', function() { | ||
expect(sanitizedData.authorization).to.equal('[SANITIZED]'); | ||
it('should return [REDACTED] for authorization', function() { | ||
expect(sanitizedData.authorization).to.equal('[REDACTED]'); | ||
}); | ||
}); | ||
}); | ||
|
@@ -101,7 +101,7 @@ describe('Errors', function() { | |
}); | ||
|
||
it('should sanitize the original error sensitive information', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and the messages? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||
expect(sanitizedError.originalError.response.request._data.secret).to.eql('[SANITIZED]'); | ||
expect(sanitizedError.originalError.response.request._data.secret).to.eql('[REDACTED]'); | ||
}); | ||
|
||
it('should have a stack with the message and location the error was created', function() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to update these variables as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.