From 98d5bbba58081aa07daf20c30e564d7509bda9a5 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Sat, 22 Feb 2020 12:01:41 +0100 Subject: [PATCH] loosen ice-ufrag/ice-pwd ice-char restrictions further Loosen the restrictions for ice-char by also allowing '#' (known to break) and '_' (urlsafe base64) in addition to the existing exceptions for '-' and '='. Also fixes typo in log message. BUG=chromium:1053756 Change-Id: I8f254a7c25f780276452fa3e27245b6b7ad1a3ce Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168943 Reviewed-by: Steve Anton Reviewed-by: Harald Alvestrand Commit-Queue: Steve Anton Cr-Commit-Position: refs/heads/master@{#30596} --- p2p/base/transport_description.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/p2p/base/transport_description.cc b/p2p/base/transport_description.cc index 841bc2bf98..5491d44fda 100644 --- a/p2p/base/transport_description.cc +++ b/p2p/base/transport_description.cc @@ -25,14 +25,14 @@ namespace cricket { namespace { bool IsIceChar(char c) { - // Note: '-' and '=' are *not* valid ice-chars but temporarily permitted - // in order to allow external software to upgrade. - if (c == '-' || c == '=') { + // Note: '-', '=', '#' and '_' are *not* valid ice-chars but temporarily + // permitted in order to allow external software to upgrade. + if (c == '-' || c == '=' || c == '#' || c == '_') { RTC_LOG(LS_WARNING) - << "'-' and '=' are not valid ice-char and thus not permitted in " - << "ufrag or pwd. This is a protocol violation that is permitted " - << "for to allow upgrading but will be rejected in the future. " - << "See https://crbug.com/1053756"; + << "'-', '=', '#' and '-' are not valid ice-char and thus not " + << "permitted in ufrag or pwd. This is a protocol violation that " + << "is permitted to allow upgrading but will be rejected in " + << "the future. See https://crbug.com/1053756"; return true; } return absl::ascii_isalnum(c) || c == '+' || c == '/';