Skip to content

Commit

Permalink
Always use HTTPS when serving within an iframe (prebid#4859)
Browse files Browse the repository at this point in the history
* ALways use HTTPS to request sfp.js

* Increment adapter version

* Fix spec
  • Loading branch information
epechuzal authored Feb 25, 2020
1 parent ac0ce27 commit 9022806
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/sharethroughBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registerBidder } from '../src/adapters/bidderFactory.js';

const VERSION = '3.2.0';
const VERSION = '3.2.1';
const BIDDER_CODE = 'sharethrough';
const STR_ENDPOINT = 'https://btlr.sharethrough.com/WYu2BXv1/v1';
const DEFAULT_SIZE = [1, 1];
Expand Down Expand Up @@ -153,7 +153,7 @@ function generateAd(body, req) {

if (req.strData.skipIframeBusting) {
// Don't break out of iframe
adMarkup = adMarkup + `<script src="//native.sharethrough.com/assets/sfp.js"></script>`;
adMarkup = adMarkup + `<script src="https://native.sharethrough.com/assets/sfp.js"></script>`;
} else {
// Add logic to the markup that detects whether or not in top level document is accessible
// this logic will deploy sfp.js and/or iframe buster script(s) as appropriate
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/sharethroughBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ describe('sharethrough adapter spec', function () {
/data-str-native-key="pKey" data-stx-response-name="str_response_bidId"/);
expect(!!adMarkup.indexOf(resp)).to.eql(true);
expect(adMarkup).to.match(
/<script src="\/\/native.sharethrough.com\/assets\/sfp.js"><\/script>/);
/<script src="https:\/\/native.sharethrough.com\/assets\/sfp.js"><\/script>/);
});
});

Expand Down

0 comments on commit 9022806

Please sign in to comment.