mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Disable renaming to empty string
So far it was possible to rename any object using LDAPUpdate to a name with empty primary key. Since this can cause nasty problems, this patch disables empty string in --rename argument. https://fedorahosted.org/freeipa/ticket/827
This commit is contained in:
parent
35b3d6b3be
commit
3e3cc55d24
@ -800,6 +800,8 @@ class LDAPUpdate(LDAPQuery, crud.Update):
|
||||
rdnupdate = False
|
||||
try:
|
||||
if self.obj.rdnattr and 'rename' in options:
|
||||
if not options['rename']:
|
||||
raise errors.ValidationError(name='rename', error=u'can\'t be empty')
|
||||
entry_attrs[self.obj.rdnattr] = options['rename']
|
||||
|
||||
if self.obj.rdnattr and self.obj.rdnattr in entry_attrs:
|
||||
|
Loading…
Reference in New Issue
Block a user