-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-27541] Add optional marketing param to email verification link #6604
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
[PM-27541] Add optional marketing param to email verification link #6604
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
04bafc4 to
e5473c9
Compare
|
Claude finished @rr-bw's task —— View job Code Review CompleteSummaryThis PR adds an optional Critical IssuesFinding 1: URL encoding applied twice results in double-encoded parameters In FromMarketing = WebUtility.UrlEncode(fromMarketing),Then in !string.IsNullOrEmpty(FromMarketing) ? $"&fromMarketing={FromMarketing}" : string.Empty);Problem: If
However, the real issue is encoding null:
Recommendation: Only encode Suggested fix// In HandlebarsMailService.cs:90
FromMarketing = fromMarketing, // Don't encode here
// In RegisterVerifyEmail.cs:22
!string.IsNullOrEmpty(FromMarketing) ? $"&fromMarketing={WebUtility.UrlEncode(FromMarketing)}" : string.Empty);Files: Suggested ImprovementsFinding 2: Missing XML documentation for new parameter The Recommendation: Add XML documentation to clarify the parameter's purpose: Suggested documentation/// <summary>
/// Sends a registration verification email to the specified email address.
/// </summary>
/// <param name="email">The recipient email address</param>
/// <param name="token">The verification token</param>
/// <param name="fromMarketing">Optional marketing initiative identifier (e.g., "premium").
/// When provided, adds a query parameter to guide post-registration flow.
/// Must be validated using MarketingInitiativeValidationAttribute.</param>
Task SendRegistrationVerificationEmailAsync(string email, string token, string? fromMarketing);Files: Good Practices Observed
Additional NotesTest CoverageCodecov reports 40% patch coverage with 6 lines missing coverage in:
The missing coverage appears to be in the property assignments and URL construction logic. Consider adding integration tests that verify the actual email content and URL structure. Security Considerations
PR Metadata AssessmentTitle: ✅ Clear and specific Objective: ✅ Well-explained with Jira reference and stacked PR context Test Plan: Suggestion: Add a test plan section describing how to manually verify:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6604 +/- ##
==========================================
- Coverage 52.99% 52.99% -0.01%
==========================================
Files 1910 1910
Lines 84843 84848 +5
Branches 7636 7638 +2
==========================================
- Hits 44966 44965 -1
- Misses 38125 38130 +5
- Partials 1752 1753 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
dani-garcia
left a comment
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.
Platform changes LGTM
52b38b0 to
d989ea1
Compare




🎟️ Tracking
PM-27541
Stacked on top of:
📔 Objective
Adds an optional
&fromMarketing=premiumquery parameter to the verification email link.Feature flag:
"pm-26140-marketing-initiated-premium-flow"📸 Screenshots
For this test, instead of sending via the Marketing site form, I locally adjusted the request in
clientsto includefromMarketing: "premium"in the POST to/accounts/register/send/verification-emailFeature flags on for this test:
"pm-26140-marketing-initiated-premium-flow""pm-24033-updat-premium-subscription-page"test-marketing-initiated-premium-flow.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes