Limit allowed characters in a netgroup name to alpha, digit, -, _ and .
Apply this to hostgroup names as well since they can be linked. https://fedorahosted.org/freeipa/ticket/2221
This commit is contained in:
1 parent
a09063cbb8
commit
7d7322de2e
5 files changed
+41
-14
No files matched your search
@@ -56,6 +56,8 @@ user2 = u'pexample'
|
||||
|
||||
group1 = u'testgroup'
|
||||
|
||||
invalidnetgroup1=u'+badnetgroup'
|
||||
|
||||
class test_netgroup(Declarative):
|
||||
"""
|
||||
Test the `netgroup` plugin.
|
||||
@@ -96,6 +98,13 @@ class test_netgroup(Declarative):
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Test an invalid netgroup name %r' % invalidnetgroup1,
|
||||
command=('netgroup_add', [invalidnetgroup1], dict(description=u'Test')),
|
||||
expected=errors.ValidationError(name='cn', error='may only include letters, numbers, _, - and .'),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Create %r' % netgroup1,
|
||||
command=('netgroup_add', [netgroup1],
|
||||
|
||||
Reference in new issue
Block a user