Skip to content

Commit

Permalink
Fix safety of [p]repo list (#6494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen authored Dec 25, 2024
1 parent 8ad9c55 commit 3888f09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion redbot/cogs/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,11 @@ async def _repo_list(self, ctx: commands.Context) -> None:
joined += "- **{}:** {}\n - {}\n".format(
repo.name,
repo.short or "",
"<{}>".format(repo.url),
(
f"<{repo.clean_url}>"
if repo.clean_url.startswith(("http://", "https://"))
else repo.clean_url
),
)

for page in pagify(joined, ["\n"], shorten_by=16):
Expand Down

0 comments on commit 3888f09

Please sign in to comment.