Allowlist pubkey prefixes only; ignore public and hashtag channels
- is_allowed matches pubkey_prefix only; sender names are never trusted
(channel senders must be known contacts of the companion for the
MeshCore integration to include their pubkey_prefix)
- channel messages on channel index 0 (public) and hashtag channels
('#name') are ignored unconditionally, before the allowlist check
- config flow validates allowlist entries as 6-64 hex characters
(invalid_allowlist error) and UI strings/README updated
This commit is contained in:
@@ -26,5 +26,11 @@ ATTR_OUTGOING = "outgoing"
|
||||
ATTR_MESSAGE_TYPE = "message_type"
|
||||
ATTR_SENDER_NAME = "sender_name"
|
||||
ATTR_PUBKEY_PREFIX = "pubkey_prefix"
|
||||
ATTR_CHANNEL = "channel"
|
||||
ATTR_CHANNEL_IDX = "channel_idx"
|
||||
ATTR_ENTRY_ID = "entry_id"
|
||||
|
||||
# Channel 0 is the public channel; hashtag channels ("#name") are the
|
||||
# other shared channels. Neither may command the agent.
|
||||
PUBLIC_CHANNEL_IDX = 0
|
||||
HASHTAG_CHANNEL_PREFIX = "#"
|
||||
|
||||
Reference in New Issue
Block a user