mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 12:38:09 +00:00
prevent adding a LinphoneAuthInfo with empty credentials.
This is causing undefined behaviors in belle-sip and SAL.
This commit is contained in:
parent
f074cecb6a
commit
897815459f
1 changed files with 4 additions and 2 deletions
|
|
@ -396,8 +396,10 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
|
|||
int restarted_op_count=0;
|
||||
bool_t updating=FALSE;
|
||||
|
||||
if (info->ha1==NULL && info->passwd==NULL){
|
||||
ms_warning("linphone_core_add_auth_info(): info supplied with empty password or ha1.");
|
||||
if (info->tls_key == NULL && info->tls_key_path == NULL
|
||||
&& info->ha1==NULL && info->passwd==NULL){
|
||||
ms_error("linphone_core_add_auth_info(): info supplied with empty password, ha1 or TLS client/key");
|
||||
return;
|
||||
}
|
||||
/* find if we are attempting to modify an existing auth info */
|
||||
ai=(LinphoneAuthInfo*)linphone_core_find_auth_info(lc,info->realm,info->username,info->domain);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue