diff --git a/pyproject.toml b/pyproject.toml index 7dc89d3..cfd3689 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "2.2.16" +version = "2.2.17" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, { name="Alex Wolden", email="awolden@gmail.com" }, diff --git a/src/meshcore/reader.py b/src/meshcore/reader.py index b825f1c..b6b46ad 100644 --- a/src/meshcore/reader.py +++ b/src/meshcore/reader.py @@ -627,7 +627,7 @@ class MessageReader: channel = None 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.update(msg) if h.digest()[0:2] == cipher_mac: