Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
don't send binary data over ipc
Browse files Browse the repository at this point in the history
auditors: @bbondy
  • Loading branch information
bridiver committed Nov 28, 2016
1 parent 0c46a17 commit 9ed262a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ function registerForBeforeRequest (session, partition) {
}

BrowserWindow.getAllWindows().forEach((wnd) =>
wnd.webContents.send(message, parentResourceName, details))
wnd.webContents.send(message, parentResourceName, {
tabId: details.tabId,
url: details.url
}))
if (details.resourceType === 'image') {
cb({ redirectURL: transparent1pxGif })
} else {
Expand All @@ -161,7 +164,10 @@ function registerForBeforeRequest (session, partition) {
appActions.addResourceCount(results.resourceName, 1)
}
BrowserWindow.getAllWindows().forEach((wnd) =>
wnd.webContents.send(messages.HTTPSE_RULE_APPLIED, results.ruleset, details))
wnd.webContents.send(messages.HTTPSE_RULE_APPLIED, results.ruleset, {
tabId: details.tabId,
url: details.url
}))
}
cb({redirectURL: results.redirectURL})
return
Expand Down

1 comment on commit 9ed262a

@bbondy
Copy link
Member

@bbondy bbondy commented on 9ed262a Nov 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.