don't auth if settings are not set to read #145
No reviewers
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#145
Loading…
Reference in New Issue
No description provided.
Delete Branch "nip42"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -352,6 +352,10 @@ export default class Connection {
}
async _OnAuthAsync(challenge: string): Promise<void> {
if(!this.Settings.read) {
I think we can always auth, because if you want to write an event but AUTH is required then it wont work
@ -352,6 +352,10 @@ export default class Connection {
}
async _OnAuthAsync(challenge: string): Promise<void> {
if(!this.Settings.read) {
Hrm, I wonder if that's confusing.
I only noticed this because I was debugging and didn't realize my private relay was set to read = false, so after auth I wasn't getting any events.
I initially thought it didn't matter, but then realized writing is usually self-authed (since you're signing the message) but reading is where the NIP42 really matters.
I don't mind either way, just caught this as I was testing and it made me think a bit.
Can close if you think it can auth anyway, it won't hurt performance or anything (it's just a single message).
@ -352,6 +352,10 @@ export default class Connection {
}
async _OnAuthAsync(challenge: string): Promise<void> {
if(!this.Settings.read) {
Well the server doesn't know that you signed the event, that's the entire point of NIP42, its to prove that you own the key (DM'S)
Pull request closed