Changeset 5872


Ignore:
Timestamp:
23/10/09 15:17:27 (10 years ago)
Author:
pjkersha
Message:

Fix to do case insensitive check on existing OpenID identifiers. Moved to 0.1.0 release

Location:
TI12-security/trunk/python/ndg_security_common_utils_openid_dbinterface
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg_security_common_utils_openid_dbinterface/ndg/security/common/utils/openid/dbinterface.py

    r5870 r5872  
    314314            newId = idBase 
    315315 
    316         if newId in ids: 
     316        if newId.lower() in ids: 
    317317            newId = "%s%d" % (idBase, counter) 
    318318            newId = DatabaseUserIdentifiers.makeUniqId(ids, 
     
    333333 
    334334            ids = [] 
     335            lowerCaseIds = [] 
    335336            accountIds = [] 
    336337            self.__cursor.execute(self.__generateQuery) 
     
    341342                accountIds += [res[0]] 
    342343                identifier = DatabaseUserIdentifiers.makeIdentifier(*res[1:3]) 
    343                 identifier = DatabaseUserIdentifiers.makeUniqId(ids, identifier) 
     344                identifier = DatabaseUserIdentifiers.makeUniqId(lowserCaseIds,  
     345                                                                identifier) 
    344346                ids += [identifier] 
     347                lowerCaseIds += [identifier.lower()] 
    345348        finally: 
    346349            self.close() 
     
    391394        res = queryRes[0] 
    392395        identifier = DatabaseUserIdentifiers.makeIdentifier(*res[1:3]) 
    393         existingIdentifiers = self.getIdentifiers() 
     396        existingIdentifiers = [i.lower() for i in self.getIdentifiers()] 
    394397        identifier = DatabaseUserIdentifiers.makeUniqId(existingIdentifiers, 
    395398                                                        identifier) 
  • TI12-security/trunk/python/ndg_security_common_utils_openid_dbinterface/setup.py

    r5871 r5872  
    1818setup( 
    1919    name =                      'openid_dbinterface', 
    20     version =                   '0.0.3', 
     20    version =                   '0.1.0', 
    2121    description =               'NDG Security OpenID Database Interface Package', 
    2222    long_description = \ 
Note: See TracChangeset for help on using the changeset viewer.