Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mime] Fix memory leak#51874
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Mime] Fix memory leak#51874
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
3fa982c toed0d833Compareed0d833 to606ee03Comparefabpot commentedOct 6, 2023
Fixing it is not possible in 5.4. |
stof commentedOct 6, 2023
@fabpot the issue is not just about sending a message with a closed generator. If you try to both access the string content and serialize the object, this will make 2 usages of the iterator, with the RawMessage being the one closing the generator in the first usage. |
fabpot commentedOct 6, 2023
@stof Sure, but that's not something people will do. What would you suggest? |
chalasr commentedOct 7, 2023
Isn't patching only diff --git a/src/Symfony/Component/Mime/RawMessage.php b/src/Symfony/Component/Mime/RawMessage.phpindex d2a311daeb..14223d3d7f 100644--- a/src/Symfony/Component/Mime/RawMessage.php+++ b/src/Symfony/Component/Mime/RawMessage.php@@ -48,12 +48,9 @@ class RawMessage implements \Serializable return; }- $message = ''; foreach ($this->message as $chunk) {- $message .= $chunk; yield $chunk; }- $this->message = $message; } /** Transforming the generator to an array in |
606ee03 toee81ae4Compare…more than once (fabpot)This PR was merged into the 6.4 branch.Discussion----------[Mime] Forbid messages that are generators to be used more than once| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets |Fix#51764,Fix#51874| License | MITThis is a continuation of#51874, when someone tries to send the same message more than once.`@chalasr` `@stof`Commits-------3c5fe51 [Mime] Forbid messages that are generators to be used more than once
Uh oh!
There was an error while loading.Please reload this page.