Commit 27ee0c3
authored
fix: trim long sender names for postman email (#1236)
## Problem
Sending transactional emails can cause downstream issues in Postman when
sender names exceed 255 characters. This issue was discovered in a Pipe
that used a variable from FormSG, where a user mistakenly entered
incorrect information in a field intended for their name.
## Solution
Trim excessively long sender names to ensure emails can still be sent
successfully. This is an edge case, as sender names are generally not
expected to be that long.
## How to test?
Connect either a FormSG or a webhook to a Pipe, and use the variable in
the Email by Postman step.
- [ ] Make a submission with extremely long sender name, email is still
sent with the trimmed sender name1 parent b706a7e commit 27ee0c3
File tree
2 files changed
+19
-1
lines changed- packages/backend/src/apps/postman
- __tests__/common
- common
2 files changed
+19
-1
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
191 | 199 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | 137 | | |
| |||
0 commit comments