elsigh / browserscope

Apache License 2.0
19 stars 12 forks source link

Mixed content. form action uses insecure url #6

Closed levidurfee closed 7 years ago

levidurfee commented 7 years ago
form.action = 'http://www.browserscope.org/beacon/ABCDJKELJ87923';
elsigh commented 7 years ago

Could you please provide more information and re-open?

levidurfee commented 7 years ago

The following will add some more JavaScript to the page.

<script>
// To save data in Browserscope do something like the following.
// The syntax is 'test_key': 'value' where test_key is some unique
// identifier for a piece of data you want to store (no = or , allowed)
// and value is a numeric value from 0 through .
// Note: You can only send a maximum of  results in a beacon.
var _bTestResults = {
  'test_one': 1,
  'test_two': 0
};

// Beacon the results to Browserscope.
(function(document) {
  var testKey = 'CHANGE-THIS-TO-YOUR-TEST-KEY';
  var newScript = document.createElement('script'),
      firstScript = document.getElementsByTagName('script')[0];
  newScript.src = 'https://www.browserscope.org/user/beacon/' + testKey;
  firstScript.parentNode.insertBefore(newScript, firstScript);
}(document));
</script>

The JavaScript that it includes references browserscope.org with http and not https. More specifically, it has to POST some data to http. If my page is using https and this script is going to POST to http I get a mixed content warning.

levidurfee commented 7 years ago

Just realized there is already a PR for this.

https://github.com/elsigh/browserscope/pull/5/commits/14b1b4590b760ce70b254c933cb2918447e2f6d8