@scrypted/server 0.130.1 → 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/python/cluster_setup.py +5 -1
package/package.json
CHANGED
package/python/cluster_setup.py
CHANGED
@@ -144,7 +144,11 @@ class ClusterSetup:
|
|
144
144
|
m = hashlib.sha256()
|
145
145
|
m.update(
|
146
146
|
bytes(
|
147
|
-
|
147
|
+
# The use of ` o.get(key, None) or '' ` is to ensure that optional fields
|
148
|
+
# are omitted from the hash, matching the JS implementation. Otherwise, since
|
149
|
+
# the dict may contain the keys initialized to None, ` o.get(key, '') ` would
|
150
|
+
# return None instead of ''.
|
151
|
+
f"{o['id']}{o.get('address', None) or ''}{o['port']}{o.get('sourceKey', None) or ''}{o['proxyId']}{self.clusterSecret}",
|
148
152
|
"utf8",
|
149
153
|
)
|
150
154
|
)
|