From 554021953fbca20ddd30301006b34889c490af32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=81=E4=BA=8C=E6=9C=88=E4=BD=9C=E6=9B=B2=E5=AE=B6?= Date: Thu, 18 Jun 2026 18:03:22 +0800 Subject: [PATCH] fix: URL-encode username to prevent invalid URLs from trailing dots Usernames ending in a period (.) created invalid URLs like 'example..com'. Now URL-encodes the full username before URL substitution. --- sherlock_project/sherlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherlock_project/sherlock.py b/sherlock_project/sherlock.py index e037d39458..995749b056 100644 --- a/sherlock_project/sherlock.py +++ b/sherlock_project/sherlock.py @@ -246,7 +246,7 @@ def sherlock( headers.update(net_info["headers"]) # URL of user on site (if it exists) - url = interpolate_string(net_info["url"], username.replace(' ', '%20')) + url = interpolate_string(net_info["url"], __import__('urllib.parse').parse.quote(username, safe='')) # Don't make request if username is invalid for the site regex_check = net_info.get("regexCheck")