-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Component/s: Integrations - Confluence Questions
-
Severity 3 - Minor
NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.
ValidationHash generation should use random.SystemRandom instead of the random.Random class when generating a random seed for new hash objects.
from random import Random .... class ValidationHashManager( models.Manager ): def _generate_md5_hash( self, user, type, hash_data, seed ): return md5( "%s%s%s%s" % ( seed, "".join( map( str, hash_data ) ), user.id, type ) ).hexdigest() def create_new( self, user, type, hash_data = [], expiration = None ): seed = ''.join( Random().sample( string.letters + string.digits, 12 ) ) hash = self._generate_md5_hash( user, type, hash_data, seed ) obj = ValidationHash( hash_code = hash, seed = seed, user = user, type = type ) if expiration is not None: obj.expiration = expiration try: obj.save()
The impact of this bug is fairly insignificant.
- is related to
-
CONFSERVER-47146 ValidationHash generation should use random.SystemRandom instead of random class
-
- Closed
-