Skip to content

Conversation

@DiegoRBaquero
Copy link
Member

return new UDPTracker(self, announceUrl)
} else if ((protocol === 'ws:' || protocol === 'wss:') && webrtcSupport) {
// Don't try to add http tracker on an https website
if (protocol === 'ws:' && location && location.protocol && location.protocol === 'https:') {
Copy link
Member

Choose a reason for hiding this comment

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

This will crash in Node.js (for example, in webtorrent-hybrid) because location is not defined.

feross added a commit that referenced this pull request Mar 16, 2016
Don't add non-secure trackers on a https site
@feross feross merged commit b2ff218 into webtorrent:master Mar 16, 2016
@feross
Copy link
Member

feross commented Mar 16, 2016

I will fix this up post-merge.

@DiegoRBaquero DiegoRBaquero deleted the patch-2 branch March 16, 2016 04:17
feross added a commit that referenced this pull request Mar 16, 2016
@feross
Copy link
Member

feross commented Mar 16, 2016

7.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants