Bug 1304500 - Validation on IP addressed failed with a comma present
Summary: Validation on IP addressed failed with a comma present
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: fusor-installer
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: TP3
: 1.0
Assignee: Jason Montleon
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks: rhci-sprint-14
TreeView+ depends on / blocked
 
Reported: 2016-02-03 20:12 UTC by John Matthews
Modified: 2019-02-25 17:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-25 17:27:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Matthews 2016-02-03 20:12:00 UTC
Description of problem:

Seen during hackathon we weren't validating comma in IP Address


Steps to Reproduce:
1. Test from ISO install
2. Enter in IP Address as 192,168.155.10
3. See lack of error validation.
4. Proceeding will break system

Comment 1 Jason Montleon 2016-03-21 16:14:27 UTC
https://github.com/fusor/fusor-installer/pull/53 will fix this

Comment 2 John Matthews 2016-04-11 20:42:00 UTC
RHEL-OSP nodes setup restrictions

Comment 3 John Matthews 2016-04-11 20:42:32 UTC
Addressed in TP3 RC3

Comment 4 Tasos Papaioannou 2016-04-18 16:52:36 UTC
With the changes from https://github.com/fusor/fusor-installer/pull/53 , validate_ntp_host in /usr/share/katello-installer/hooks/lib/provisioning_wizard.rb looks like this:

---
  def validate_ntp_host
    if @ntp_host.nil? || @ntp_host.empty?
      'NTP sync host must be specified'
    elsif !(valid_hostname?(@ntp_host))  && !(valid_hostname?(@ntp_host))
      'NTP sync host - Invalid Hostname or IP address'
    end
  end
---

What's the reason for having

!(valid_hostname?(@ntp_host))  && !(valid_hostname?(@ntp_host))

instead of just

!(valid_hostname?(@ntp_host))

? 

Maybe it was intended to be:

!(valid_ip?(@ntp_host)) || !(valid_hostname?(@ntp_host))

?

Comment 5 Jason Montleon 2016-04-18 20:08:23 UTC
This is what was meant. It should be possible to enter an IP or hostname for the ntp host.

!(valid_ip?(@ntp_host)) || !(valid_hostname?(@ntp_host))

Comment 6 Tasos Papaioannou 2016-04-18 23:10:45 UTC
Shouldn't it be:

!(valid_ip?(@ntp_host)) && !(valid_hostname?(@ntp_host))

i.e., if (not a valid ip address) AND (not a valid hostname), then return ''NTP sync host - Invalid Hostname or IP address'?

Comment 7 Jason Montleon 2016-04-21 14:46:41 UTC
Yes. I think we're saying the same thing; it's a bug and should be fixed. Working on it now

Comment 8 Tasos Papaioannou 2016-04-21 15:44:10 UTC
Verified on fusor-installer-0.0.14-40.el7_2.noarch.rpm

Comment 9 Jason Montleon 2016-04-22 13:38:10 UTC
https://github.com/fusor/fusor-installer/pull/55

Comment 10 Sudhir Mallamprabhakara 2019-02-25 17:27:21 UTC
QCI has sunset. Closing the BZ's.


Note You need to log in before you can comment on or make changes to this bug.