-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat(SPV-1248) add domain check for paymail entry #828
base: main
Are you sure you want to change the base?
Conversation
feat(paymail) add checkPaymailDomain function for domain validation feat(error) add error definition to engine code for invalid domain chore(paymailCreateAddress) add logic for domain validation check
Manual Testsℹ️ Remember to ask team members to perform manual tests and to assign |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #828 +/- ##
==========================================
- Coverage 45.97% 45.91% -0.07%
==========================================
Files 369 369
Lines 17820 17840 +20
==========================================
- Hits 8193 8191 -2
- Misses 9020 9042 +22
Partials 607 607
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
config := reqctx.AppConfig(c) | ||
if config.Paymail.DomainValidationEnabled { | ||
_, actualDomain, _ := paymail.SanitizePaymail(requestBody.Address) | ||
if !checkPaymailDomain(actualDomain, config.Paymail.Domains) { | ||
spverrors.ErrorResponse(c, spverrors.ErrInvalidDomain, logger) | ||
return | ||
} | ||
} |
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.
This is duplicated code.
But since we plan to remove the "old" handlers soon (I believe 🙈), it is totally fine to me 👍
Pull Request Checklist