Commit 8dd79a8c authored by François Grisez's avatar François Grisez

ExternalAuth: fix SDP corruption when P-Asserted-Identity header is inserted

Using msg_header_add_str() to add a header caused the new
header to be added after the headers/body separator and thus
corrupted the SDP.
parent ec39d2e7
Pipeline #6047 passed with stages
in 38 minutes and 59 seconds
......@@ -120,7 +120,8 @@ void ModuleExternalAuthentication::onSuccess(const FlexisipAuthStatus &as) {
const auto &authStatus = dynamic_cast<const ExternalAuthModule::Status &>(as);
ModuleAuthenticationBase::onSuccess(as);
if (!authStatus.pAssertedIdentity().empty()) {
msg_header_add_str(ms->getMsg(), reinterpret_cast<msg_pub_t *>(sip), authStatus.pAssertedIdentity().c_str());
string header = "P-Asserted-Identity: " + authStatus.pAssertedIdentity();
sip_add_make(ms->getMsg(), sip, sip_unknown_class, header.c_str());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment