-
-
Notifications
You must be signed in to change notification settings - Fork 161
Fix information exposure in OrderInvoiceController and OrderShipmentController #2962
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
Conversation
…OrderShipmentController Replace exception messages and stack traces in client responses with generic error messages. Detailed error information is now logged server-side using LoggerInterface. Fixes security vulnerability where internal implementation details were exposed to clients. Co-authored-by: dpfaffenbauer <5981845+dpfaffenbauer@users.noreply.github.com>
Address code review feedback to return appropriate error status code instead of HTTP 200 when an error occurs during PDF rendering. Co-authored-by: dpfaffenbauer <5981845+dpfaffenbauer@users.noreply.github.com>
| ]; | ||
| } catch (\Exception $e) { | ||
| $responseData = '<strong>' . $e->getMessage() . '</strong><br>trace: ' . $e->getTraceAsString(); | ||
| $this->container->get(LoggerInterface::class)->error( |
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.
@copilot remove log and don't overexpose response
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.
Removed the logging and simplified the error response to just return a generic message with HTTP 500 status. Fixed in de3345e.
Address review feedback to remove logging calls and simplify error responses while still preventing information exposure. Co-authored-by: dpfaffenbauer <5981845+dpfaffenbauer@users.noreply.github.com>
|
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |



Summary
This PR fixes a security vulnerability (Information Exposure) where internal error messages and stack traces were being returned directly to clients in case of server errors.
Changes Made
OrderInvoiceController.php (renderAction method)
OrderShipmentController.php (renderAction method)
Security Fix
Before: Exception messages and full stack traces were embedded directly into HTML responses sent to clients.
After: Simple generic error message with HTTP 500 status.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.