]> git.mxchange.org Git - fba.git/blobdiff - fba/http/csrf.py
Continued:
[fba.git] / fba / http / csrf.py
index 9f349e7fdcfe85d72394e4ef4e3a854442bf98d0..b84d5aaf6c7bb5a36a89158917655c88e6ec7570 100644 (file)
@@ -20,6 +20,7 @@ import bs4
 import reqto
 import requests
 
+from fba.helpers import blacklist
 from fba.helpers import config
 from fba.helpers import cookies
 from fba.helpers import domain as domain_helper
@@ -35,7 +36,9 @@ def determine(domain: str, headers: dict) -> dict:
     logger.debug("domain='%s',headers()=%d - CALLED!", domain, len(headers))
     domain_helper.raise_on(domain)
 
-    if not isinstance(headers, dict):
+    if blacklist.is_blacklisted(domain):
+        raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+    elif not isinstance(headers, dict):
         raise ValueError(f"Parameter headers[]='{type(headers)}' is not of type 'dict'")
 
     # Default headers with no CSRF