Commit ee70f45
fix(relay): centralize NIP-ER author-only delivery gate in fan-out path
The author-only delivery gate for NIP-ER reminders (AUTHOR_ONLY_KINDS)
lived inline in dispatch_persistent_event, so it covered only the
in-process fan-out path. The Redis cross-node path (subscribe_local in
main.rs) calls fan_out + filter_fanout_by_access but never applied the
author-only check — a reminder published on one node and received by
another was fanned out to any matching subscriber, leaking author-private
reminders across nodes.
Move the gate into filter_fanout_by_access, the single post-fan_out
chokepoint both delivery paths already share. It now runs independent of
channel scope (author-only kinds are stored globally, channel_id=None) and
cannot be bypassed by any path that delivers through the shared filter.
The redundant inline check is removed.
Document the Redis routing trust boundary at publish_event: per-author
routing is not the isolation boundary (every node PSUBSCRIBEs
buzz:channel:* and must receive every event since the author may connect
to any node); filter_fanout_by_access is the actual author-only delivery
boundary, now enforced on both fan-out paths.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>1 parent 139d97e commit ee70f45
2 files changed
Lines changed: 72 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
64 | 85 | | |
65 | 86 | | |
66 | 87 | | |
| |||
138 | 159 | | |
139 | 160 | | |
140 | 161 | | |
141 | | - | |
142 | | - | |
| 162 | + | |
| 163 | + | |
143 | 164 | | |
144 | 165 | | |
145 | 166 | | |
| |||
151 | 172 | | |
152 | 173 | | |
153 | 174 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
| |||
1129 | 1141 | | |
1130 | 1142 | | |
1131 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1132 | 1179 | | |
1133 | 1180 | | |
0 commit comments