Issue #11499 has been updated by Daniel Pittman.

Assignee deleted (Daniel Pittman)

----------------------------------------
Bug #11499: validation code for puppet resource host does not properly check if 
ip is valid
https://projects.puppetlabs.com/issues/11499#change-92278

* Author: Garrett Honeycutt
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: host
* Target version: 2.7.10
* Affected Puppet version: 2.7.6
* Keywords: 
* Branch: https://github.com/puppetlabs/puppet/pull/296
----------------------------------------
It appears that we only check that the digits are [0-9] and period, while we 
should be doing an actual IP check

Attempting to use a letter. Fails as expected.
<pre>
[root@puppet ~]# puppet resource host junk.tld ip=1.2.3.a ensure=present
Could not run: Parameter ip failed: Invalid IP address
</pre>

Attempting to use a bad IP, which works and should not.
<pre>
[root@puppet ~]# puppet resource host junk.tld ip=10.10.10.10.10 ensure=present
notice: /Host[junk.tld]/ensure: created
host { 'junk.tld':
  ensure => 'present',
  ip     => '10.10.10.10.10',
  target => '/etc/hosts',
}
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to