Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebTorrent: Prevent protocol encryption over WebRTC #5200

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

paullouisageneau
Copy link
Contributor

@paullouisageneau paullouisageneau commented Oct 6, 2020

This PR fixes the assert m_recv_buffer.packet_size() == dh_key_len from aux::bt_peer_connection::on_receive_impl in #5100

WebTorrent connections are always made over DTLS and therefore should never use protocol encryption.

For reference: #4123

@arvidn
Copy link
Owner

arvidn commented Oct 6, 2020

do you think the issue happened when libtorrent attempted to connect to Webtorrent peers that don't support protocol encryption?
ideally this assert wouldn't fire even in that case though, but if that's the problem, it's probably unrelated to webtorrent support anyway.

@paullouisageneau
Copy link
Contributor Author

paullouisageneau commented Oct 7, 2020

Yes, this is the situation that seems to trigger the issue. It's not perfectly clear to me what happens but PE should definitely not be used for WebTorrent, and the Javascript client doesn't support it.

@arvidn arvidn merged commit d7dbc57 into arvidn:master Oct 8, 2020
@paullouisageneau paullouisageneau deleted the webtorrent-fix-pe branch October 11, 2020 11:15
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