Issue #21101 has been reported by Mark Zeren.

----------------------------------------
Bug #21101: AuthStore::Declaration comparison issues
https://projects.puppetlabs.com/issues/21101

* Author: Mark Zeren
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: network
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
While experimenting with a new feature I have uncovered what I think are 
several bugs in the comparison operator of AuthStore::Declaration. In no 
particular order:

1) :deny_ip does not sort before :allow_ip (:deny does sort before :allow)

2) :opaque sorting relative to :domain is not terribly well defined. See 
discussion below.

3) :regex is :inexact but has a nil length. This contradicts other inexact 
declarations and leads to an undefined method '<' / ArgumentError for 
"*.example.com" <=> "/example/".

Some other issues / comments that may or may not be bugs:

4) Comparisons of un-interpolated :dynamic declarations are I believe intended 
to be undefined, but we don't detect this case. Should we throw if we're asked 
to compare a :dynamic declaration?

5) Should (:domain,:exact), (:opaque,:exact) really have the current 
lexicographical order where "a_name" sorts before "example.com" because ["a"] 
<=> ["c", "e"] == -1 ?




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