Skip to content

Commit 303eae4

Browse files
committed
fixup! sphinx: add check for blinding point
1 parent 623ccb5 commit 303eae4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sphinx.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,11 @@ func (r *Router) ProcessOnionPacket(onionPkt *OnionPacket, assocData []byte,
629629
o(cfg)
630630
}
631631

632-
// If this is an onion message, a blinding point must be provided.
633-
if cfg.isOnionMessage && cfg.blindingPoint == nil {
632+
// If this is an onion message, a blinding point must be provided and
633+
// associated data must be nil.
634+
if cfg.isOnionMessage && cfg.blindingPoint == nil && assocData != nil {
634635
return nil, fmt.Errorf("blinding point must be provided for " +
635-
"onion messages")
636+
"onion messages, and associated data must be nil")
636637
}
637638

638639
// Compute the shared secret for this onion packet.

0 commit comments

Comments
 (0)