webext-core icon indicating copy to clipboard operation
webext-core copied to clipboard

Missing message id check in defineCustomEventMessaging

Open stotiks opened this issue 8 months ago • 0 comments

Currently, there's no message id verification (detail.message.id === requestEvent.detail.message.id) in the responseListener. This omission can lead to mismatched responses when multiple messages are in flight simultaneously, as responses might be incorrectly paired with unrelated requests.

https://github.com/aklinker1/webext-core/blob/684feda2bf8304cf7bafa9e94a436880e855f691/packages/messaging/src/custom-event.ts#L75

Thanks!

stotiks avatar Apr 09 '25 00:04 stotiks