From 3964e1f4b26e3a7f8577f21f862abd9b137cc011 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Tue, 22 Mar 2022 20:22:21 -0400 Subject: [PATCH] meme: disable direct URL memes GitHub noticed this is a security problem, so I am disabling it. --- plugins/meme/meme.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/meme/meme.go b/plugins/meme/meme.go index 8ffcb8e..a617d08 100644 --- a/plugins/meme/meme.go +++ b/plugins/meme/meme.go @@ -194,7 +194,9 @@ func (p *MemePlugin) sendMeme(c bot.Connector, channel, channelName, msgID strin formats := p.c.GetMap("meme.memes", defaultFormats) imgURL, ok := formats[format] if !ok { - imgURL = format + log.Debug().Msgf("Bad meme request: %v, %v", from, text) + p.bot.Send(c, bot.Message, channel, fmt.Sprintf("%v tried to send me a bad meme request.", from.Name)) + return } stampURL := p.stamp(c, format, from.ID)