Adding a restriction for legal RID values.

According to the spec, RID values should be constrained to only
alpha-numeric values. This was not enforced in our implementation to
allow for more flexibility.
It has been brought to our attention that some values that we currently
consider legal (such as the '~', '=' ';' characters) might cause confusion
with the simulcast syntax that uses these characters to indicate other
meanings.
What's worse, is that some characters, when used in RIDs (such as
\u{1f937} \u{1f4a9} and \u{1f926}) cause uncontrollable laughter for some
users which might also be a health hazard.
This change resolves these issues by restricting RIDs to alpha-numeric.

Bug: webrtc:10491
Change-Id: I16e262c87525d0289764beacd098e1525a355463
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132061
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27499}
This commit is contained in:
Amit Hilbuch
2019-04-08 14:11:57 -07:00
committed by Commit Bot
parent 19a94cb81d
commit 07f3279a73
5 changed files with 33 additions and 0 deletions

View File

@ -469,6 +469,10 @@ const char* kRidDescriptionMalformedStrings[] = {
"1 send pt=",
"1 send pt=abc",
"1 recv ;;",
"~1 recv",
"1$2 send",
"1=2 send",
"1* send",
};
INSTANTIATE_TEST_SUITE_P(RidDescriptionDeserializationErrors,