mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Convert Bool to TRUE/FALSE when working with LDAP backend https://fedorahosted.org/freeipa/ticket/1259
According to RFC4517 the only valid values for a boolean in LDAP are TRUE or FALSE. This commit adds support to recognize TRUE and FALSE as valid Bool constants when converting from LDAP attribute values and enforces TRUE or FALSE string for account locking.
This commit is contained in:
committed by
Rob Crittenden
parent
f1e1223bd9
commit
716a25a784
@@ -903,8 +903,8 @@ class Bool(Param):
|
||||
# FIXME: This my quick hack to get some UI stuff working, change these defaults
|
||||
# --jderose 2009-08-28
|
||||
kwargs = Param.kwargs + (
|
||||
('truths', frozenset, frozenset([1, u'1', u'true'])),
|
||||
('falsehoods', frozenset, frozenset([0, u'0', u'false'])),
|
||||
('truths', frozenset, frozenset([1, u'1', u'true', u'TRUE'])),
|
||||
('falsehoods', frozenset, frozenset([0, u'0', u'false', u'FALSE'])),
|
||||
)
|
||||
|
||||
def _convert_scalar(self, value, index=None):
|
||||
|
||||
Reference in New Issue
Block a user