mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
event.test: tamper with things in a more evil way
This commit is contained in:
@@ -248,7 +248,7 @@ describe('Event', () => {
|
||||
)
|
||||
|
||||
// tamper with the signature
|
||||
event.sig = event.sig.replace(/0/g, '1')
|
||||
event.sig = event.sig.replace(/^.{3}/g, '666')
|
||||
|
||||
const isValid = verifySignature(event)
|
||||
|
||||
@@ -294,7 +294,7 @@ describe('Event', () => {
|
||||
)
|
||||
|
||||
// tamper with the id
|
||||
event.id = event.id.replace(/0/g, '1')
|
||||
event.id = event.id.replace(/^.{3}/g, '666')
|
||||
|
||||
const isValid = verifySignature(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user