You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(email): block header injection in template aliases
Add validation to detect and reject template aliases containing
carriage returns or line feeds to prevent header injection attacks.
Apply this validation in SendTemplatedEmail and SendTemplatedEmailBatch
to ensure all template aliases are safe before sending emails.
Include comprehensive tests to verify valid aliases pass and
malicious aliases trigger errors, enhancing email security.
* refactor: use http.Method constants for HTTP requests
Replace string literals for HTTP methods with the standard
net/http.MethodGet, MethodPost, MethodDelete, etc. constants
across multiple packages and files including inbound_rules_triggers,
bounce, sender_signatures, data_removals, email, and the test router.
This improves code readability, consistency, and reduces the risk
of typos in method strings. Additionally, update TestRouter to use
http.Request parameter names and method constants for clarity.
* refactor: use http.Method constants and add PushTemplates tests
Replace raw HTTP method strings with standard http.Method constants
throughout template client methods for improved consistency and clarity.
Add comprehensive tests for PushTemplates API including simulation mode,
verifying request payload, headers, and response unmarshaling to ensure
correct client behavior and robustness when pushing templates between servers.
0 commit comments