[Erp5-report] r15666 - /erp5/trunk/products/ERP5SyncML/Subscription.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Aug 14 14:09:42 CEST 2007


Author: fabien
Date: Tue Aug 14 14:09:42 2007
New Revision: 15666

URL: http://svn.erp5.org?rev=15666&view=rev
Log:
add control of the len of b16encode gid's

Modified:
    erp5/trunk/products/ERP5SyncML/Subscription.py

Modified: erp5/trunk/products/ERP5SyncML/Subscription.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/Subscription.py?rev=15666&r1=15665&r2=15666&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/Subscription.py (original)
+++ erp5/trunk/products/ERP5SyncML/Subscription.py Tue Aug 14 14:09:42 2007
@@ -1064,9 +1064,10 @@
     This tries to get the object with the given gid
     This uses the query if it exist
     """
-    #if len(gid)%2 != 0:
+    if len(gid)%2 != 0:
     #something encode in base 16 is always a even number of number
-    #  return None
+    #if not, b16decode will failed
+      return None
     signature = self.getSignatureFromGid(gid)
     # First look if we do already have the mapping between
     # the id and the gid




More information about the Erp5-report mailing list