diff options
author | p37sitdu, corvid <devnull@localhost> | 2012-10-03 01:19:45 +0000 |
---|---|---|
committer | p37sitdu, corvid <devnull@localhost> | 2012-10-03 01:19:45 +0000 |
commit | 39ee4950acf53e63f0a8bf8cd7111f7ad282f6bb (patch) | |
tree | dc8779a49e158a5d0e9e4327543f672a41b1ec23 /src/capi.c | |
parent | 78003c727f7eae3a593260941aa4db6627dd1e75 (diff) |
introduce domainrc mechanism
Diffstat (limited to 'src/capi.c')
-rw-r--r-- | src/capi.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -26,6 +26,7 @@ #include "nav.h" #include "dpiapi.h" #include "uicmd.hh" +#include "domain.h" #include "../dpip/dpip.h" /* for testing dpi chat */ @@ -378,6 +379,13 @@ int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData) const char *scheme = URL_SCHEME(web->url); int safe = 0, ret = 0, use_cache = 0; + /* web->requester is NULL if the action is initiated by user */ + if (!(a_Capi_get_flags(web->url) & CAPI_IsCached || + web->requester == NULL || + a_Domain_permit(web->requester, web->url))) { + return 0; + } + /* reload test */ reload = (!(a_Capi_get_flags(web->url) & CAPI_IsCached) || (URL_FLAGS(web->url) & URL_E2EQuery)); |