Please sign in to comment.
[FIX] base: put parsing of an email 'from' into a try except block
The "from" of an email is expected to follow the regex "name <address>(, name <address>)*". We simply split the from on the commas "," and try to interpret each piece as a (name, address) pair. If a "from" contains a name that is not quoted, and contains special characters before the comma, then we would try to encode that name into an email address, and fail on a UnicodeEncodeError. E.g. the following "
🐧, <email@example.com>" would be parsed as [('', ' 🐧'),('', 'firstname.lastname@example.org')] thus Odoo would crash on trying to use 🐧as email address. With this commit we would just mess up the name in these situations, by ignoring failures. opw 1923429 closes #33145 Signed-off-by: Nans Lefebvre (len) <email@example.com>
- Loading branch information...
Showing with 10 additions and 2 deletions.