verify if channels has hashes ...

This commit is contained in:
Florent 2026-03-05 13:56:29 -04:00
parent af9f90b5bd
commit 9f66885594
2 changed files with 2 additions and 2 deletions

View file

@ -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" },

View file

@ -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: