Allow all "token" chars from RFC 4566 when checking for legal mid names.
Previously only alphanumeric characters were allowed.
Bug: webrtc:9537
Change-Id: I3fd793ad88520b25ecd884efe3a698f2f0af4639
Reviewed-on: https://webrtc-review.googlesource.com/89388
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24167}
diff --git a/api/rtp_headers.h b/api/rtp_headers.h
index c0b22cc..c762534 100644
--- a/api/rtp_headers.h
+++ b/api/rtp_headers.h
@@ -39,7 +39,14 @@
// maximum length that can be encoded with one-byte header extensions.
static constexpr size_t kMaxSize = 16;
- static bool IsLegalName(rtc::ArrayView<const char> name);
+ static bool IsLegalMidName(rtc::ArrayView<const char> name);
+ static bool IsLegalRsidName(rtc::ArrayView<const char> name);
+
+ // TODO(bugs.webrtc.org/9537): Deprecate and remove when third parties have
+ // migrated to "IsLegalRsidName".
+ static bool IsLegalName(rtc::ArrayView<const char> name) {
+ return IsLegalRsidName(name);
+ }
StringRtpHeaderExtension() { value_[0] = 0; }
explicit StringRtpHeaderExtension(rtc::ArrayView<const char> value) {