diff options
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)); |