-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary:
The sanitizeHeaders function in RollbarService.cfc does not sanitize the httpData argument as intended. When called in sendToRollbar, the httpData variable remains unchanged, leading to unsanitized headers being included in the payload object.
Steps to Reproduce:
- Review the RollbarService.cfc file.
- Locate the sanitizeHeaders private function (line 67).
- Observe that the function does not return or replace the httpData argument passed to it.
- In the sendToRollbar function (line 128), note that the sanitizeHeaders function is called but does not assign its result back to the httpData variable.
- Check the payload object construction (line 144) where the unsanitized httpData is used.
- Expected Behavior:
- The sanitizeHeaders function should sanitize the httpData argument passed to it. When sanitizeHeaders is called in sendToRollbar, the sanitized data should replace the original httpData variable. This ensures that headers are sanitized in the same way as fields and query strings before building the payload object.
Actual Behavior:
The headers in the httpData variable remain unsanitized when constructing the payload object. This could lead to sensitive or unintended header information being included in logs sent to Rollbar.
Impact:
Unsanitized headers may expose sensitive information in error logs, which could be a security risk.
Suggested Fix:
Update the sanitizeHeaders function (line 67) to ensure it modifies and/or returns the sanitized httpData argument.
In the sendToRollbar function (line 128), assign the sanitized result back to the httpData variable.
Validate that the payload object built on line 144 includes sanitized headers.
Environment:
File: RollbarService.cfc
Affected Lines: 67, 128, 144
Let me know if you'd like additional details! Ty.