Fix bug 51266, allow cookie blocking for local files and the about: protocol. r=morse a=morse

This commit is contained in:
BlakeR1234%aol.com 2000-09-09 05:20:09 +00:00
Родитель 1b5dad648c
Коммит 72652578a0
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -868,6 +868,7 @@ permission_Check(
hostname++;
}
StrAllocCopy(hostname2, hostname);
Recycle(hostname);
permission_Add(hostname2, permission, type, PR_TRUE);
}
if (rememberChecked != permission_GetRememberChecked(type)) {
@ -2529,9 +2530,10 @@ Image_Block(nsString imageURL) {
char * imageURLCString = imageURL.ToNewCString();
char *host = cookie_ParseURL(imageURLCString, GET_HOST_PART);
Recycle(imageURLCString);
if (PL_strlen(host) != 0) {
permission_Add(host, PR_FALSE, IMAGEPERMISSION, PR_TRUE);
}
char * hostname = nsnull;
StrAllocCopy(hostname, host);
Recycle(host);
permission_Add(hostname, PR_FALSE, IMAGEPERMISSION, PR_TRUE);
}
PUBLIC void
@ -2542,9 +2544,10 @@ Permission_Add(nsString imageURL, PRBool permission, PRInt32 type) {
char * imageURLCString = imageURL.ToNewCString();
char *host = cookie_ParseURL(imageURLCString, GET_HOST_PART);
Recycle(imageURLCString);
if (PL_strlen(host) != 0) {
permission_Add(host, permission, type, PR_TRUE);
}
char * hostname = nsnull;
StrAllocCopy(hostname, host);
Recycle(host);
permission_Add(hostname, permission, type, PR_TRUE);
}
MODULE_PRIVATE time_t