Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 "🐧, <a@a.com>" would be parsed as [('', '🐧'),('', 'a@a.com')] 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) <len@odoo.com>
- Loading branch information