by max-m » Wed Apr 25, 2018 6:00 pm
Hello,
the function navigator.sendBeacon(url, data) is being blocked by NoScript.
NoScript: 10.1.7.5
Firefox: 59.0.2
Steps to reproduce:
Run navigator.sendBeacon('/SOMETHING_RECOGNIZABLE', {}) on any site (via the browser console or directly as script on the page).
sendBeacon will return true (indicating successful queuing of the request) but the network tab won't show any beacon request.
With NoScript disabled the beacon request is being sent immediately and logged in the network tab (it also works on unload).
This can also be confirmed by looking at the server logs if done on a site controlled by yourself.
Probable cause (after a quick grep through the extension):
NoScript has multiple definitions of the different permission types.
The bg/RequestGuard.js defines the type ping for beacons and pings. This type is not present in the UI or common/Policy.js.
My attempt of adding "ping" to the Permissions.ALL object and setting custom permissions for my website (the NoScript UI now had a new, unlabled checkbox) made it work via the browser console at least, but not via window.addEventListener("unload", ...).
Hello,
the function [i]navigator.sendBeacon(url, data)[/i] is being blocked by NoScript.
NoScript: 10.1.7.5
Firefox: 59.0.2
Steps to reproduce:
Run [i]navigator.sendBeacon('/SOMETHING_RECOGNIZABLE', {})[/i] on any site (via the browser console or directly as script on the page).
[i]sendBeacon[/i] will return [i]true[/i] (indicating successful queuing of the request) but the network tab won't show any beacon request.
With NoScript disabled the beacon request is being sent immediately and logged in the network tab (it also works on unload).
This can also be confirmed by looking at the server logs if done on a site controlled by yourself.
Probable cause (after a quick grep through the extension):
NoScript has multiple definitions of the different permission types.
The [i]bg/RequestGuard.js[/i] defines the type [i]ping[/i] for beacons and pings. This type is not present in the UI or [i]common/Policy.js[/i].
My attempt of adding [i]"ping"[/i] to the [i]Permissions.ALL[/i] object and setting custom permissions for my website (the NoScript UI now had a new, unlabled checkbox) made it work via the browser console at least, but not via [i]window.addEventListener("unload", ...)[/i].