зеркало из https://github.com/mozilla/pjs.git
implement a better test for determining foreign images
This commit is contained in:
Родитель
0f417b3b1e
Коммит
c4cd0afca9
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче