Opened 15 years ago
Closed 15 years ago
#9074 closed defect (fixed)
Notification system shows warning/error when the project domain contains Unicode characters
Reported by: | Owned by: | John Hampton | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | general | Version: | 0.12dev |
Severity: | normal | Keywords: | unicode md5 messageid |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
No idea if this issue exists for URLs that have a Unicode character in their path somewhere, only had it with an internationalized domain name. The warning it gave in the UI was "Warnung: The ticket has been created, but an error occurred while sending notifications: 'ascii' codec can't encode character u'\xe9' in position 22: ordinal not in range(128)" and the same message appeared in the log as an ERROR.
Attachments (2)
Change History (6)
by , 15 years ago
Attachment: | trac-0.12-dev-internationalized-domain-name-fix.patch added |
---|
comment:1 by , 15 years ago
Keywords: | unicode md5 messageid added |
---|---|
Milestone: | → 0.12 |
Owner: | set to |
Status: | new → assigned |
So, the issue is that we use the project url as part of the Message-ID
hash. If it has non-ascii characters in it, then it fails during md5().hexdigest()
.
The solution is to simply encode the project url in ascii, ignoring any non-convertible characters. I'll create a test and then commit the fix.
by , 15 years ago
Attachment: | t9074_unicde_project_url_message_id.patch added |
---|
Convert project url to UTF-8 when being used in the message-id
comment:2 by , 15 years ago
comment:3 by , 15 years ago
John, thanks for the patch! I've applied it and it works as expected.
In testing it, however, I noticed I still had smtp_default_domain and smtp_from set to the "xn—…" transcriptions of the domain name. Using Unicode chars in there reveals another error message, "Warnung: The change has been saved, but an error occurred while sending notifications: execv() arg 2 must contain only strings".
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
pacopablo's patch, which fixes the issue