[Freeipa-devel] [PATCH 0038] Fix generation of invalid OTP URIs

Alexander Bokovoy abokovoy at redhat.com
Mon Mar 24 11:07:17 UTC 2014


On Mon, 24 Mar 2014, Petr Vobornik wrote:
>On 23.3.2014 22:17, Alexander Bokovoy wrote:
>>On Mon, 10 Feb 2014, Nathaniel McCallum wrote:
>>>Patch attached.
>>
>>>>From e7eac9997750ee1a8ce864746dbc6faa54de766b Mon Sep 17 00:00:00 2001
>>>From: Nathaniel McCallum <npmccallum at redhat.com>
>>>Date: Mon, 10 Feb 2014 12:07:51 -0500
>>>Subject: [PATCH] Fix generation of invalid OTP URIs
>>>
>>>---
>>>ipalib/plugins/otptoken.py | 9 +++++++++
>>>1 file changed, 9 insertions(+)
>>>
>>>diff --git a/ipalib/plugins/otptoken.py b/ipalib/plugins/otptoken.py
>>>index
>>>5a5d35d153e7b3698aeebe1e93831b48a8b8f91e..ff92efa11776171b09993060e0805c8ffa6806da
>>>100644
>>>--- a/ipalib/plugins/otptoken.py
>>>+++ b/ipalib/plugins/otptoken.py
>>>@@ -202,6 +202,15 @@ class otptoken_add(LDAPCreate):
>>>    )
>>>
>>>    def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys,
>>>**options):
>>>+        # These are values we always want to write to LDAP. So if
>>>they are
>>>+        # specified as a value that evaluates to False (i.e. None),
>>>delete them
>>>+        # and fill in the defaults below.
>>>+        for attr in ('ipatokentotpclockoffset', 'ipatokentotptimestep',
>>>+                     'ipatokenotpalgorithm', 'ipatokenotpdigits',
>>>+                     'ipatokenotpkey'):
>>>+            if attr in entry_attrs and not entry_attrs[attr]:
>>>+                del entry_attrs[attr]
>>>+
>>>        # Set defaults. This needs to happen on the server side
>>>because we may
>>>        # have global configurable defaults in the near future.
>>>        options.setdefault('type', TOKEN_TYPES[0])
>>ACK.
>>
>>
>>Since this patch rotted a bit, attaching rebased version.
>>
>
>IMO we should not push this patch.
>
>Wasn't it superseded by: https://git.fedorahosted.org/cgit/freeipa.git/commit/?id=21ff4f920e4ff7c1e2870024f007f067fc3cf6c8 
>?
I knew I missed one of patches when looking up. Thanks!

This one can be ignored then.
-- 
/ Alexander Bokovoy




More information about the Freeipa-devel mailing list