Bug 1323723: reject setup value actpass in answers. r?bwc
MozReview-Commit-ID: FnuiLB6OjbL
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -2047,16 +2047,23 @@ JsepSessionImpl::ValidateAnswer(const Sd
offerAttrs.HasAttribute(SdpAttribute::kMidAttribute) &&
offerAttrs.GetMid() != answerAttrs.GetMid()) {
JSEP_SET_ERROR("Answer changes mid for level, was \'"
<< offerMsection.GetAttributeList().GetMid()
<< "\', now \'"
<< answerMsection.GetAttributeList().GetMid() << "\'");
return NS_ERROR_INVALID_ARG;
}
+
+ if (answerAttrs.HasAttribute(SdpAttribute::kSetupAttribute, true) &&
+ answerAttrs.GetSetup().mRole == SdpSetupAttribute::kActpass) {
+ JSEP_SET_ERROR("Answer contains illegal setup attribute \"actpass\""
+ " at level " << i);
+ return NS_ERROR_INVALID_ARG;
+ }
}
return NS_OK;
}
nsresult
JsepSessionImpl::CreateReceivingTrack(size_t mline,
const Sdp& sdp,