meme: disable direct URL memes

GitHub noticed this is a security problem, so I am disabling it.
This commit is contained in:
Chris Sexton 2022-03-22 20:22:21 -04:00
parent 1f7ce69674
commit 3964e1f4b2
1 changed files with 3 additions and 1 deletions

View File

@ -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)