Skip to content

Reset translator injection before injecting settings - #92

Merged
shyim merged 2 commits into
FriendsOfShopware:mainfrom
M-arcus:M-arcus-patch-1
Oct 6, 2026
Merged

shyim merged 2 commits into
FriendsOfShopware:mainfrom
M-arcus:M-arcus-patch-1

Conversation

@M-arcus

@M-arcus M-arcus commented Oct 6, 2026

Copy link
Copy Markdown
Member

SendMailAction has already injected the mail's settings when this event is dispatched. Injecting again on top of that overwrites the translator's localeBeforeInject with the already injected locale, so SendMailAction's resetInjection() restores the mail's locale instead of the one the request started with - leaking it into everything that follows.

@shyim

shyim commented Oct 6, 2026

Copy link
Copy Markdown
Member

but since which shopware version all range?

@M-arcus

M-arcus commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

All Shopware 6 versions

@shyim

shyim commented Oct 6, 2026

Copy link
Copy Markdown
Member

@frosh-ci fix-cs

@frosh-automation

Copy link
Copy Markdown
Contributor

Code style has been fixed and pushed to the branch.

@shyim
shyim merged commit 7d09ae6 into FriendsOfShopware:main Oct 6, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlowSubscriber::fixTranslator() leaks the mail locale into the rest of the request

2 participants