Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: webrtc/api/webrtcsdp.cc

Issue 2639183002: Ignore ufrag/password in "a=candidate" lines in SDP. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsdp.cc
diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc
index e19840bdf2f94a417d049b01a0f0a620d8bc9aa0..c79c851c3a1465e2ad2d4d46047e46535cba1bc1 100644
--- a/webrtc/api/webrtcsdp.cc
+++ b/webrtc/api/webrtcsdp.cc
@@ -2676,6 +2676,12 @@ bool ParseContent(const std::string& message,
if (!ParseCandidate(line, &candidate, error, false)) {
return false;
}
+ // ParseCandidate will parse non-standard ufrag and password attributes,
+ // since it's used for candidate trickling, but we only want to process
+ // the "a=ice-ufrag"/"a=ice-pwd" values in a session description, so
+ // strip them off at this point.
+ candidate.set_username(std::string());
+ candidate.set_password(std::string());
candidates_orig.push_back(candidate);
} else if (HasAttribute(line, kAttributeIceUfrag)) {
if (!GetValue(line, kAttributeIceUfrag, &transport->ice_ufrag, error)) {
« no previous file with comments | « no previous file | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698