25 Commits

Author SHA1 Message Date
fiatjaf
650d9209c3 policies: nip70 enforcer. 2025-03-11 17:42:27 -03:00
fiatjaf
31128ebd18 filter policy: MustAuth() 2025-02-02 14:30:28 -03:00
fiatjaf
4dba9376a0 sanedefaults: allow a bigger burst of connections and events. 2024-12-10 23:40:03 -03:00
Anthony Accioly
553d848362
fix(policies): update check for ephemeral kinds
The Event.IsEphemeral method has been removed from go-nostr
2024-11-05 17:32:56 +00:00
fiatjaf
902e882d97 policies: RestrictToSpecifiedKinds() to allow ephemeral. 2024-10-22 13:32:24 -03:00
fiatjaf
08be77b914 empty filters are not insane. 2024-09-24 19:01:57 -03:00
fiatjaf
e25400a61a actually we don't need all that fluff. 2024-09-16 17:39:54 -03:00
fiatjaf
635e91f360 policies: shoehorn an iterator in a xsync map Range(). 2024-09-16 15:59:08 -03:00
fiatjaf
6d827ac89a return blank IP and do not rate-limit when calling AddEvent(). 2024-09-11 23:02:01 -03:00
fiatjaf
b8bb58f77c sane defaults: increase initial connections limit burst. 2024-09-11 08:00:39 -03:00
fiatjaf
e8637afa38 policies: timestamps policies take time.Duration 2024-08-20 10:40:29 -03:00
fiatjaf
81ad56e85c simplify RestrictToSpecifiedKinds() 2024-05-12 20:54:53 -03:00
fiatjaf
f8afb51ee9 ratelimits. 2024-05-12 20:37:00 -03:00
fiatjaf
8b1a7f2195 ApplySaneDefaults() 2024-04-19 15:38:34 -03:00
fiatjaf
8557c7a8dc policy to reject events with base64 media. 2024-04-19 15:33:15 -03:00
fiatjaf
3214dac302 fix pre-search on policies. 2024-03-30 14:23:17 -03:00
fiatjaf
5efadf6256 do not give away so much. 2024-03-29 18:25:47 -03:00
fiatjaf
27d6769009 format last commit. 2024-03-29 18:24:44 -03:00
Sebastix
44baacac42 * sort kinds before the binary search is run
* optimized return messages with more context why the policy blocks an event
2024-03-29 18:24:21 -03:00
fiatjaf
35053f6215 when LimitZero don't do any database queries. 2024-03-29 08:12:39 -03:00
fiatjaf
c5c17029ba
basic kind validation policy. 2024-03-13 12:40:54 -03:00
fiatjaf
9b43da0b17
use stdlib "slices". 2024-02-08 16:35:35 -03:00
fiatjaf
e9bcad8614
policies that remove elements from the query should just cancel the query if they remove everything. 2024-02-07 08:38:42 -03:00
fiatjaf
728417852e
fix nip04 policy. 2023-11-29 12:30:18 -03:00
fiatjaf
194ec994d7
rename plugins to policies. 2023-11-22 17:11:05 -03:00