Update parsing of stun and turn urls for RFC 7064-7065
Main change is deleting support for @userinfo in turn urls. This was specified in early internet drafts, but never made it into RFC 7065. Bug: webrtc:6663, webrtc:10422 Change-Id: Idd315a9e6001326f3104be62be3bd0991adc7db4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128423 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27171}
This commit is contained in:
@ -200,16 +200,9 @@ TEST_F(IceServerParsingTest, ParseTransport) {
|
||||
EXPECT_FALSE(ParseTurnUrl("?"));
|
||||
}
|
||||
|
||||
// Test parsing ICE username contained in URL.
|
||||
TEST_F(IceServerParsingTest, ParseUsername) {
|
||||
EXPECT_TRUE(ParseTurnUrl("turn:user@hostname"));
|
||||
EXPECT_EQ(1U, turn_servers_.size());
|
||||
EXPECT_EQ("user", turn_servers_[0].credentials.username);
|
||||
|
||||
EXPECT_FALSE(ParseTurnUrl("turn:@hostname"));
|
||||
EXPECT_FALSE(ParseTurnUrl("turn:username@"));
|
||||
EXPECT_FALSE(ParseTurnUrl("turn:@"));
|
||||
EXPECT_FALSE(ParseTurnUrl("turn:user@name@hostname"));
|
||||
// Reject pre-RFC 7065 syntax with ICE username contained in URL.
|
||||
TEST_F(IceServerParsingTest, ParseRejectsUsername) {
|
||||
EXPECT_FALSE(ParseTurnUrl("turn:user@hostname"));
|
||||
}
|
||||
|
||||
// Test that username and password from IceServer is copied into the resulting
|
||||
|
Reference in New Issue
Block a user