mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
verify if channels has hashes ...
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "2.2.16"
|
version = "2.2.17"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ class MessageReader:
|
|||||||
|
|
||||||
channel = None
|
channel = None
|
||||||
for c in self.channels:
|
for c in self.channels:
|
||||||
if c["channel_hash"] == chan_hash : # validate against MAC
|
if "channel_hash" in c and c["channel_hash"] == chan_hash : # validate against MAC
|
||||||
h = HMAC.new(c["channel_secret"], digestmod=SHA256)
|
h = HMAC.new(c["channel_secret"], digestmod=SHA256)
|
||||||
h.update(msg)
|
h.update(msg)
|
||||||
if h.digest()[0:2] == cipher_mac:
|
if h.digest()[0:2] == cipher_mac:
|
||||||
|
|||||||
Reference in New Issue
Block a user