From 48e849f569863982b7ee55166d5b09a20da5232c Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Wed, 19 Feb 2020 21:57:45 +0100 Subject: [PATCH] loosen ice-ufrag/ice-pwd ice-char restrictions Loosen the restrictions for ice-char by allowing '-' and '='. Being spec-compliant breaks interoperability. The spec-behaviour will be restored with a notice period. BUG=chromium:1053756,chromium:1044521 No-Try: True Change-Id: I880babd0869302bd713912ddfcfa48866fad32c1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168820 Commit-Queue: Steve Anton Reviewed-by: Steve Anton Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/master@{#30560} --- p2p/base/transport_description.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/p2p/base/transport_description.cc b/p2p/base/transport_description.cc index dd7e38e5a8..841bc2bf98 100644 --- a/p2p/base/transport_description.cc +++ b/p2p/base/transport_description.cc @@ -14,6 +14,7 @@ #include "absl/strings/match.h" #include "p2p/base/p2p_constants.h" #include "rtc_base/arraysize.h" +#include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" using webrtc::RTCError; @@ -24,6 +25,16 @@ 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 == '=') { + 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"; + return true; + } return absl::ascii_isalnum(c) || c == '+' || c == '/'; }