mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
fix store auth info in case of no ha1 provided and store_ha1_passwd=true
This commit is contained in:
parent
ee50e0e3c1
commit
9c3540b804
2 changed files with 5 additions and 6 deletions
|
|
@ -165,13 +165,11 @@ void linphone_auth_info_write_config(LpConfig *config, LinphoneAuthInfo *obj, in
|
|||
lp_config_set_string(config,key,"ha1",obj->ha1);
|
||||
}
|
||||
if (obj->passwd != NULL){
|
||||
if (store_ha1_passwd){
|
||||
if (obj->ha1){
|
||||
/*if we have our ha1 and store_ha1_passwd set to TRUE, then drop the clear text password for security*/
|
||||
linphone_auth_info_set_passwd(obj, NULL);
|
||||
}
|
||||
if (store_ha1_passwd && obj->ha1){
|
||||
/*if we have our ha1 and store_ha1_passwd set to TRUE, then drop the clear text password for security*/
|
||||
linphone_auth_info_set_passwd(obj, NULL);
|
||||
}else{
|
||||
/*we store clear text password only if store_ha1_passwd is FALSE*/
|
||||
/*we store clear text password only if store_ha1_passwd is FALSE AND we have an ha1 to store. Otherwise, passwd would simply be removed, which might bring major auth issue*/
|
||||
lp_config_set_string(config,key,"passwd",obj->passwd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1076,6 +1076,7 @@ static void test_list_subscribe (void) {
|
|||
"<list>\n"
|
||||
"\t<entry uri=\"%s\" />\n"
|
||||
"\t<entry uri=\"%s\" />\n"
|
||||
"\t<entry uri=\"sip:+33952@toto.com;user=phone\" />\n"
|
||||
"</list>\n"
|
||||
"</resource-lists>\n";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue