Skip to content

Commit

Permalink
fix ssrf vulnerability by removing the unnecessary/unused fetching lo… (
Browse files Browse the repository at this point in the history
OWASP-BLT#3764)

* fix ssrf vulnerability by removing the unnecessary/unused fetching logic of favicon.ico

* Apply pre-commit fixes
  • Loading branch information
gojo-satorou-v7 authored Mar 2, 2025
1 parent 41d3dbe commit c6c677b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions website/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
UserProfile,
Wallet,
)
from website.utils import is_valid_https_url, rebuild_safe_url

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -175,17 +174,7 @@ def post(self, request, *args, **kwargs):
domain = None
if email:
domain = email.split("@")[-1]
try:
full_url_domain = "https://" + domain + "/favicon.ico"
if is_valid_https_url(full_url_domain):
safe_url = rebuild_safe_url(full_url_domain)
response = requests.get(safe_url, timeout=5)
if response.status_code == 200:
exists = "exists"
except:
pass
context = {
"exists": exists,
"domain": domain,
"email": email,
}
Expand Down

0 comments on commit c6c677b

Please sign in to comment.