mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
bug 122126, reviewed by valeski
This commit is contained in:
parent
74805620cf
commit
e4997a7ba0
@ -66,6 +66,7 @@ extern int MK_ACCESS_COOKIES_WISHES;
|
|||||||
#if defined(CookieManagement)
|
#if defined(CookieManagement)
|
||||||
extern int MK_ACCESS_COOKIES_WISHES0;
|
extern int MK_ACCESS_COOKIES_WISHES0;
|
||||||
extern int MK_ACCESS_COOKIES_WISHES1;
|
extern int MK_ACCESS_COOKIES_WISHES1;
|
||||||
|
extern int MK_ACCESS_COOKIES_WISHESN;
|
||||||
extern int MK_ACCESS_COOKIES_REMEMBER;
|
extern int MK_ACCESS_COOKIES_REMEMBER;
|
||||||
extern int MK_ACCESS_COOKIES_ACCEPTED;
|
extern int MK_ACCESS_COOKIES_ACCEPTED;
|
||||||
extern int MK_ACCESS_COOKIES_PERMISSION;
|
extern int MK_ACCESS_COOKIES_PERMISSION;
|
||||||
@ -738,10 +739,15 @@ NET_AskForAuthString(MWContext *context,
|
|||||||
if (username && !(*username))
|
if (username && !(*username))
|
||||||
PR_Free(username);
|
PR_Free(username);
|
||||||
PR_FREEIF(password);
|
PR_FREEIF(password);
|
||||||
status = PC_PromptUsernameAndPassword(context, buf,
|
#if defined(SingleSignon)
|
||||||
&username, &password,
|
/* prefill prompt with previous username/passwords if any */
|
||||||
&remember_password,
|
status = SI_PromptUsernameAndPassword
|
||||||
NET_IsURLSecure(URL_s->address));
|
(context, buf, &username, &password, URL_s->address);
|
||||||
|
#else
|
||||||
|
status = PC_PromptUsernameAndPassword
|
||||||
|
(context, buf, &username, &password,
|
||||||
|
&remember_password, NET_IsURLSecure(URL_s->address));
|
||||||
|
#endif
|
||||||
|
|
||||||
PR_Free(buf);
|
PR_Free(buf);
|
||||||
}
|
}
|
||||||
@ -1943,23 +1949,28 @@ net_IntSetCookieString(MWContext * context,
|
|||||||
list_ptr = net_cookie_list;
|
list_ptr = net_cookie_list;
|
||||||
while((cookie = (net_CookieStruct *)
|
while((cookie = (net_CookieStruct *)
|
||||||
XP_ListNextObject(list_ptr))!=0) {
|
XP_ListNextObject(list_ptr))!=0) {
|
||||||
if (tmp_host && cookie->host &&
|
if (host_from_header && cookie->host &&
|
||||||
PL_strcmp(tmp_host, cookie->host) == 0) {
|
PL_strcmp(host_from_header, cookie->host) == 0) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
net_unlock_cookie_list();
|
net_unlock_cookie_list();
|
||||||
|
|
||||||
if (count>0) {
|
if (count>1) {
|
||||||
new_string = PR_smprintf(
|
new_string = PR_smprintf(
|
||||||
XP_GetString(MK_ACCESS_COOKIES_WISHES1),
|
XP_GetString(MK_ACCESS_COOKIES_WISHESN),
|
||||||
tmp_host ? tmp_host : "",
|
tmp_host ? tmp_host : "",
|
||||||
count);
|
count);
|
||||||
|
} else if (count==1){
|
||||||
|
new_string = PR_smprintf(
|
||||||
|
XP_GetString(MK_ACCESS_COOKIES_WISHES1),
|
||||||
|
tmp_host ? tmp_host : "");
|
||||||
} else {
|
} else {
|
||||||
new_string = PR_smprintf(
|
new_string = PR_smprintf(
|
||||||
XP_GetString(MK_ACCESS_COOKIES_WISHES0),
|
XP_GetString(MK_ACCESS_COOKIES_WISHES0),
|
||||||
tmp_host ? tmp_host : "");
|
tmp_host ? tmp_host : "");
|
||||||
}
|
}
|
||||||
|
PR_Free(tmp_host);
|
||||||
#else
|
#else
|
||||||
StrAllocCopy(new_string, XP_GetString(MK_ACCESS_COOKIES_THE_SERVER));
|
StrAllocCopy(new_string, XP_GetString(MK_ACCESS_COOKIES_THE_SERVER));
|
||||||
StrAllocCat(new_string, tmp_host ? tmp_host : "");
|
StrAllocCat(new_string, tmp_host ? tmp_host : "");
|
||||||
|
Loading…
Reference in New Issue
Block a user