Преглед изворни кода

[libsentry] Workaround in API for THRIFT-3388 hash doesn't work on authorizables

Romain Rigaux пре 10 година
родитељ
комит
63039a5
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      desktop/libs/libsentry/gen-py/sentry_generic_policy_service/ttypes.py

+ 1 - 1
desktop/libs/libsentry/gen-py/sentry_generic_policy_service/ttypes.py

@@ -261,7 +261,7 @@ class TSentryPrivilege(object):
     value = 17
     value = 17
     value = (value * 31) ^ hash(self.component)
     value = (value * 31) ^ hash(self.component)
     value = (value * 31) ^ hash(self.serviceName)
     value = (value * 31) ^ hash(self.serviceName)
-    value = (value * 31) ^ hash(self.authorizables)
+    value = (value * 31) ^ hash(frozenset(self.authorizables))
     value = (value * 31) ^ hash(self.action)
     value = (value * 31) ^ hash(self.action)
     value = (value * 31) ^ hash(self.createTime)
     value = (value * 31) ^ hash(self.createTime)
     value = (value * 31) ^ hash(self.grantorPrincipal)
     value = (value * 31) ^ hash(self.grantorPrincipal)