Nightbot does not encode parameters in urlfetch?

Asked Nov 17, 2020·2 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Writing my own server that is meant to be used by Nightbot's urlfetch I've found out that Nightbot does not encode $(query) parameter in urlfetch. This can lead to unwanted results or even may be dangerous as $(query) can contain any string. Any parameter expanded inside $(urlfetch) must be URIcomponent-encoded (so e.g. ampersand symbols & turn into %26)

2 replies

@Nutty Panda Hmm... Why using "$(query)" in "$(urlfetch)"? Use "$(querystring)" or "$(querystring $(query))". Well, you have point.

Oh, right. I overlooked this parameter. Seems like querystring is the right thing to use. Thanks for pointing this out.