소스 검색

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

Romain Rigaux 9 년 전
부모
커밋
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 = (value * 31) ^ hash(self.component)
     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.createTime)
     value = (value * 31) ^ hash(self.grantorPrincipal)