Skip to content

Commit

Permalink
fix: check if lower case url starts with http
Browse files Browse the repository at this point in the history
Using lower() explicitly makes sure that there is no HTTP at the start.
  • Loading branch information
d-Rickyy-b committed Dec 27, 2020
1 parent 21af899 commit a377aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pastepwn/analyzers/urlanalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _resolve_url(self, url):
Returns False if the URL cannot be resolved.
"""
# If the url doesn't start with a protocol, we'll test with http and https.
if not url.startswith("http"):
if not url.lower().startswith("http"):
for protocol in ("http", "https"):
# If adding the protocol makes this resolve, the url works.
if self._resolve_url("{0}://{1}".format(protocol, url)):
Expand Down

0 comments on commit a377aee

Please sign in to comment.