← Back to team overview

mahara-contributors team mailing list archive

[Bug 618509] Re: XMLRPC link to hosts with underscores in hostname fails

 

I suspect that the reason you're getting an unknown error is that, in 1.2.5, we were only catching RemoteServerExceptions in auth/xmlrpc/lib.php:PluginAuthXmlrpc->validate_config_options().
In Mahara 1.3+ we also catch ParamOutOfRangeException and you would actually get the correct error message printed to screen (e.g. Could not find IP address for host).

I'll try this now and attempt to verify...

Since gethostbyname() is also returning 'moodle', I suspect that the
best way to detect whether the hostname is valid is to compare with a
regex such as _.*://([^/]*).*_ and issue a ParamOutOfRangeException if
the hostname doesn't match the hostname from get_hostname_from_uri.

-- 
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