Skip to content

Commit

Permalink
fix threat detected
Browse files Browse the repository at this point in the history
  • Loading branch information
NexusNull committed Dec 1, 2023
1 parent 7d54d73 commit 4735347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def security_threat(self,domain):
logging.info(referer)
if referer.startswith("127.0.0.1"): return False
if referer.startswith("0.0.0.0"): return False
if not (referer.startswith("%s.%s.%s/"%(domain.domain[0],domain.domain[1],domain.domain[2])) or referer.startswith("%s.%s/"%(domain.domain[1],domain.domain[2])) or referer=="%s.%s.%s"%(domain.domain[0],domain.domain[1],domain.domain[2]) or referer=="%s.%s"%(domain.domain[1],domain.domain[2])):
if not (referer.startswith(domain.domain) or referer.startswith("%s.%s.%s/"%(domain.domain[0],domain.domain[1],domain.domain[2])) or referer.startswith("%s.%s/"%(domain.domain[1],domain.domain[2])) or referer=="%s.%s.%s"%(domain.domain[0],domain.domain[1],domain.domain[2]) or referer=="%s.%s"%(domain.domain[1],domain.domain[2])):
self.response.out.write("Threat detected")
return True
# if is_production and domain.cf_always_on and not is_cloudflare(self):
Expand Down

0 comments on commit 4735347

Please sign in to comment.