diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a39fe..dceb06b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - `?tex` command to render a LaTeX expression. - Configuration option to use another rTeX instance for `?tex`. +### Fixed +- Lack of input sanitisation in `?xkcd`. ## [2.6.0] - 2021-03-18 diff --git a/exts/fun.py b/exts/fun.py index 2890272..c8939d7 100644 --- a/exts/fun.py +++ b/exts/fun.py @@ -27,9 +27,9 @@ class FunCog(commands.Cog): self.words = words_file.read().lower().splitlines() @commands.command(name="xkcd", aliases=["x"], category=cmn.cat.fun) - async def _xkcd(self, ctx: commands.Context, number: str): + async def _xkcd(self, ctx: commands.Context, number: int): """Looks up an xkcd comic by number.""" - await ctx.send("http://xkcd.com/" + number) + await ctx.send("http://xkcd.com/" + str(number)) @commands.command(name="tar", category=cmn.cat.fun) async def _tar(self, ctx: commands.Context):