Edgewall Software

Opened 12 years ago

Closed 12 years ago

#9074 closed defect (fixed)

Notification system shows warning/error when the project domain contains Unicode characters

Reported by: raphael.schmid@… 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:


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)

trac-0.12-dev-internationalized-domain-name-fix.patch (654 bytes ) - added by raphael.schmid@… 12 years ago.
pacopablo's patch, which fixes the issue
t9074_unicde_project_url_message_id.patch (1.5 KB ) - added by John Hampton 12 years ago.
Convert project url to UTF-8 when being used in the message-id

Download all attachments as: .zip

Change History (6)

by raphael.schmid@…, 12 years ago

pacopablo's patch, which fixes the issue

comment:1 by John Hampton, 12 years ago

Keywords: unicode md5 messageid added
Milestone: 0.12
Owner: set to John Hampton
Status: newassigned

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.

Last edited 12 years ago by John Hampton (previous) (diff)

by John Hampton, 12 years ago

Convert project url to UTF-8 when being used in the message-id

comment:2 by John Hampton, 12 years ago

The attached patch takes a slightly different approach in that it converts the project url to UTF-8, instead of dropping unconvertible characters converting to ASCII.

The accompanying test verifies the change.

Raphael, will you please try the attached patch and post the outcome?

comment:3 by Raphael J. Schmid <raphael.schmid@…>, 12 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 John Hampton, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [9267].

Raphael, I am closing this ticket as this issue is now fixed. I have opened ticket #9082 to track the issue with smtp_default_domain and smtp_from. Will you please add yourself to the CC list for #9082, as well as post a traceback there? Thanks

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Hampton.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from John Hampton to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.