feat: reject events that are too large
A new configuration setting controls the maximum size of event messages, and sends a notice to the client if they exceed it. Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/14
This commit is contained in:
@@ -21,6 +21,8 @@ pub enum Error {
|
||||
CloseParseFailed,
|
||||
#[error("Event validation failed")]
|
||||
EventInvalid,
|
||||
#[error("Event too large")]
|
||||
EventMaxLengthError(usize),
|
||||
#[error("Subscription identifier max length exceeded")]
|
||||
SubIdMaxLengthError,
|
||||
#[error("Maximum concurrent subscription count reached")]
|
||||
|
||||
Reference in New Issue
Block a user