Opened 8 years ago

Closed 8 years ago

#77 closed defect (fixed)

Domains for SRV lookups must be byte strings

Reported by: ralphm Owned by: ralphm
Priority: highest Milestone:
Component: generic Keywords:
Cc:

Description (last modified by ralphm)

A change in Twisted 12.3.0 enforces domain names to be passed as byte strings. This causes Wokkel's use of twisted.names.srvconnect.SRVConnector, by passing the host part of a JID as a unicode object, to fail. Even if the hostname is all-ASCII.

The associated issue in Twisted is twisted:ticket:6245.

Change History (2)

comment:1 Changed 8 years ago by ralphm

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 8 years ago by ralphm

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [37f36ea93838]:)

Properly encode IDN domain names for SRV lookups.

Before Twisted 12.3.0, the SRV lookup done for outgoing connections succeeded if passed a unicode string with all-ASCII code points. A recent change made the DNS code more strict, and only byte string are accepted as domain name. See http://twistedmatrix.com/trac/ticket/6245 for details.

This change makes sure domain names are encoded to their ASCII Compatible Equivalent (ACE) version before passing the resulting byte string to twisted.names.srvconnect.SRVConnector, as per RFC 3490.

Note that while connecting to servers with an IDN domain name now works properly, authentication using MD5-Digest SASL mechanism will fail until http://twistedmatrix.com/trac/ticket/5066 has been resolved.

Fixes: #77.

Note: See TracTickets for help on using tickets.