mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #01247
[Bug 618509] Re: XMLRPC link to hosts with underscores in hostname fails
Hi Nathan,
I've just been having a closer look at this bug. I can confirm that, as
you suggest, get_hostname_from_uri() in api/xmlrpc/lib.php does not
accept underscores in hostnames. However, I also believe that it is
correct in no accepting these. Section 3.2.2 of RFC 2396[1] describes
the form of a hostname:
----------
Hostnames take the form described in Section 3 of [RFC1034] and
Section 2.1 of [RFC1123]: a sequence of domain labels separated by
".", each domain label starting and ending with an alphanumeric
character and possibly also containing "-" characters.
----------
Therefore, the only valid characters are:
* [a-z]
* [A-Z]
* [0-9]
* -
* .
Since an underscore is not a valid character for a hostname, I'd argue
that this isn't a bug.
Perhaps we should improve the error to be more informative instead...
---
[1] http://www.ietf.org/rfc/rfc2396.txt
See also http://www.ietf.org/rfc/rfc1034.txt and http://www.ietf.org/rfc/rfc1123.txt
** Changed in: mahara
Status: Triaged => Invalid
--
XMLRPC link to hosts with underscores in hostname fails
https://bugs.launchpad.net/bugs/618509
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Status in Mahara ePortfolio: Invalid
Bug description:
When establishing an XMLRPC connection to a network peer that has an underscore in the hostname an unknown error is thrown.
The get_hostname_from_uri function in api/xmlrpc/lib.php is the cause of the problem. The regular expression (~line 47) does not cater for underscores...
Version is 1.2.5, OS is Windows and database is PostgreSQL.
References