Bug 460801

Summary: RHN Proxy installer do not allow dash in hostname if you install to non-default port
Product: [Community] Spacewalk Reporter: Miroslav Suchý <msuchy>
Component: Proxy ServerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 0.2CC: rhn-bugs, skarmark
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-17 07:00:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 460800    
Bug Blocks: 456550    

Description Miroslav Suchý 2008-09-01 09:18:02 UTC
+++ This bug was initially created as a clone of Bug #460800 +++

Description of problem:
From tech-list:
"btw, the root cause is the webform on rhn.redhat.com that is used for  
> setting up proxies.  it originally didn't let me put in a '-' in the  
> hostname, even though '-' is a perfectly valid character to put in  
> hostnames.   i would have liked to put in tur-cache1, with the port  
> 8080.  since it didn't let me do that i ended up (in frustration) just  
> putting in turcache1 and missed out the port.  then i just hand edited  
> /etc/rhn/rhn.conf with the correct info.  however that was ages ago, and  
> after this upgrade it looks like what i had originally entered in the  
> webform got put in rhn.conf again, and i forgot (or didn't think it was  
> necessary) to modify rhn.conf again.  i sent an email to somewhere  
> (linked off rhn.redhat.com 'Contact Us' or something like that), but  
> didn't get a reply. "
>
> Anyone know if this is still an issue with setting up RHN proxy? More  
> importantly where do the "Contact us" emails go in this case as a  
> general follow up to the clients concerns and lack of reply?


I checked it and it really do not allow such scenarion.
The problem is in 
web/modules/rhn/RHN/Form/Require.pm
in function fqdn_and_port, which has this regexp:
  if ($text =~ /([^a-zA-z0-9\.-:])/) {
The problem is in  ".-:", correct should be:
  if ($text =~ /([^a-zA-z0-9\.:-])/) {

Comment 1 Miroslav Suchý 2008-09-01 09:21:39 UTC
Fixed as 14b10142c24611ba748f0df8ee801815554a2f2e

Comment 2 Sayli Karmarkar 2008-09-11 19:54:04 UTC
verified

Comment 3 Miroslav Suchý 2009-09-17 07:00:17 UTC
Spacewalk is released for long time.