@scrypted/server 0.130.1 → 0.130.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/server",
3
- "version": "0.130.1",
3
+ "version": "0.130.2",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "@scrypted/ffmpeg-static": "^6.1.0-build3",
@@ -144,7 +144,11 @@ class ClusterSetup:
144
144
  m = hashlib.sha256()
145
145
  m.update(
146
146
  bytes(
147
- f"{o['id']}{o.get('address', '')}{o['port']}{o.get('sourceKey', '')}{o['proxyId']}{self.clusterSecret}",
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
  )