On Wed, Oct 17, 2012 at 07:45:04PM -0700, David Johansen wrote: > Hi, > > I recently setup an instance using custom ports, 8080,8443, for the webui. > I ran into an issue with OSAD when trying to connect clients. After looking > at the code, I noticed that osad was failing because my <netloc> portion of > the url was spacewalk.example.com:8080, which did not match my CN, > spacewalk.example.com. I added an if statement to cover that, > in /usr/share/rhn/osad/osad.py, that checks for a ":" in netloc, and if it > exists, then it sets netloc to the domain name without the :port. I've > never seen a legitimate cert with port numbers included in the common name, > so figure this would be a worthy patch to send your way. > > https://raw.github.com/gist/3909534/92a8eea0b8cac895a9613d77601678cddc4a89ca/osad.py.patch
This patch will fail for example for IPv6 addresses. The correct approach would be to use ParseResult's hostname. Except it is not supported on python 2.4. We might need to check for the type and either call hostname or strip the port _from the end_ of the netloc, something like :[0-9]+$. -- Jan Pazdziora Principal Software Engineer, Satellite Engineering, Red Hat _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel