Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a01ce80

Browse filesBrowse files
committed
bug #46735 [Messenger] Do not log the message object itself (ajardin)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Do not log the message object itself In order to avoid the leak of sensitive data (e.g. credentials) or the overflow of third-party services. | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | This is a follow-up of #46450 where we had a discussion with @Nyholm about the problems related to the logging of the message object. I'm targeting the `5.4` branch as we see this change as a (security ?) fix rather than a new feature. Commits ------- f1604e6 [Messenger] Do not log the message object itself
2 parents b3c1841 + f1604e6 commit a01ce80
Copy full SHA for a01ce80

File tree

Expand file treeCollapse file tree

4 files changed

+0
-4
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+0
-4
lines changed

‎src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public function onMessageFailed(WorkerMessageFailedEvent $event)
5656

5757
$message = $envelope->getMessage();
5858
$context = [
59-
'message' => $message,
6059
'class' => \get_class($message),
6160
];
6261

‎src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
5353
$message = $envelope->getMessage();
5454

5555
$context = [
56-
'message' => $message,
5756
'class' => \get_class($message),
5857
];
5958

‎src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function __construct(SendersLocatorInterface $sendersLocator, EventDispat
4646
public function handle(Envelope $envelope, StackInterface $stack): Envelope
4747
{
4848
$context = [
49-
'message' => $envelope->getMessage(),
5049
'class' => \get_class($envelope->getMessage()),
5150
];
5251

‎src/Symfony/Component/Messenger/Worker.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Worker.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ private function ack(): bool
208208
if (null !== $this->logger) {
209209
$message = $envelope->getMessage();
210210
$context = [
211-
'message' => $message,
212211
'class' => \get_class($message),
213212
];
214213
$this->logger->info('{class} was handled successfully (acknowledging to transport).', $context);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.