We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fcbb32 commit 74161caCopy full SHA for 74161ca
1 file changed
src/background/index.mjs
@@ -688,7 +688,13 @@ Browser.runtime.onMessage.addListener(async (message, sender) => {
688
}
689
690
case 'GET_COOKIE': {
691
- console.log('[background] Processing GET_COOKIE message:', message.data)
+ const senderId = sender?.id
692
+ if (!senderId || senderId !== Browser.runtime.id) {
693
+ console.warn('[background] Rejecting GET_COOKIE message from untrusted sender:', sender)
694
+ return null
695
+ }
696
+
697
+ console.debug('[background] Processing GET_COOKIE message for:', message.data?.url)
698
try {
699
const cookie = await Browser.cookies.get({
700
url: message.data.url,
0 commit comments