mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Verify all events if verifying
This commit is contained in:
parent
5a1ab30c8f
commit
9b14b81a35
@ -299,7 +299,7 @@ impl WebSocketService {
|
|||||||
|
|
||||||
let event_flags = event_flags(event, &user);
|
let event_flags = event_flags(event, &user);
|
||||||
|
|
||||||
if !event_flags.author_is_an_authorized_user || GLOBALS.config.read().verify_events {
|
if GLOBALS.config.read().verify_events {
|
||||||
// Verify the event is valid (id is hash, signature is valid)
|
// Verify the event is valid (id is hash, signature is valid)
|
||||||
if let Err(e) = event.verify() {
|
if let Err(e) = event.verify() {
|
||||||
return Err(ChorusError::EventIsInvalid(format!("{}", e.inner)).into());
|
return Err(ChorusError::EventIsInvalid(format!("{}", e.inner)).into());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user