-
Couldn't load subscription status.
- Fork 1
(feat) Pass the locale #51
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR integrates locale propagation into user creation and confirmation workflows by extending controllers, commands, message classes, DTOs, and handlers to pass and use the locale for sending localized confirmation emails. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/MessageHandler/User/SendConfirmationHandler.php:48` </location>
<code_context>
'confirmationLink' => $this->router->generate(
'user_confirm',
[
+ '_locale' => $message->locale,
'token' => $user->getConfirmationToken(),
],
</code_context>
<issue_to_address>
Passing locale in the confirmation link may expose internal details.
Validate the locale value before including it in URLs to prevent potential spoofing or exposure of sensitive information.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| 'confirmationLink' => $this->router->generate( | ||
| 'user_confirm', | ||
| [ | ||
| '_locale' => $message->locale, |
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.
🚨 suggestion (security): Passing locale in the confirmation link may expose internal details.
Validate the locale value before including it in URLs to prevent potential spoofing or exposure of sensitive information.
Pass the locale in the
app:user:createconsole command.With this the email can be send.
Summary by Sourcery
Pass the user's locale throughout account creation and confirmation flows to enable sending localized confirmation emails.
New Features:
app:user:createconsole command and include it in the CreateUser message.Enhancements: