Bug 1603790 - Only add unobfuscated addresses to mSignaledAddresses; r=mjf

We should only add a hostname to mSignaledAddresses if it is not obfuscated.
Prior to Bug 1567201 this was handled by an early exit in
MediaTransportHandlerSTS::AddIceCandidate if the address was obfuscated.
With the changes in Bug 1567201, that early exit went away and we're now adding
all addresses to mSignaledAddresses which breaks hiding prflx and srflx
addresses. Unfortunately, this is not something that easily unit testable.

Differential Revision: https://phabricator.services.mozilla.com/D57140

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dan Minor 2019-12-16 21:05:46 +00:00
Родитель 8c741dedaf
Коммит e3b31c2c02
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -703,7 +703,11 @@ void MediaTransportHandlerSTS::AddIceCandidate(
nsresult rv = stream->ParseTrickleCandidate(aCandidate, aUfrag,
aObfuscatedAddress);
if (NS_SUCCEEDED(rv)) {
if (mObfuscateHostAddresses && tokens.size() > 4) {
// If the address is not obfuscated, we want to track it as
// explicitly signaled so that we know it is fine to reveal
// the address later on.
if (mObfuscateHostAddresses && tokens.size() > 4 &&
aObfuscatedAddress.empty()) {
mSignaledAddresses.insert(tokens[4]);
}
} else {