implement a better test for determining foreign images

This commit is contained in:
morse%netscape.com 2000-03-26 23:36:03 +00:00
Родитель 0f417b3b1e
Коммит c4cd0afca9
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -1066,6 +1066,9 @@ permission_Check
} }
} }
PRIVATE int
cookie_SameDomain(char * currentHost, char * firstHost);
PUBLIC nsresult PUBLIC nsresult
Image_CheckForPermission(char * hostname, char * firstHostname, PRBool &permission) { Image_CheckForPermission(char * hostname, char * firstHostname, PRBool &permission) {
@ -1083,7 +1086,8 @@ Image_CheckForPermission(char * hostname, char * firstHostname, PRBool &permissi
/* try to make a decision based on pref settings */ /* try to make a decision based on pref settings */
if ((image_GetBehaviorPref() == COOKIE_DontUse) || if ((image_GetBehaviorPref() == COOKIE_DontUse) ||
(image_GetBehaviorPref() == COOKIE_DontAcceptForeign && (image_GetBehaviorPref() == COOKIE_DontAcceptForeign &&
PL_strcmp(hostname, firstHostname))) { // PL_strcmp(hostname, firstHostname))) {
!cookie_SameDomain(hostname, firstHostname))) {
permission = PR_FALSE; permission = PR_FALSE;
return NS_OK; return NS_OK;
} }