From bbb5f7e226a6ce521283e9e6d438cbad3f293239 Mon Sep 17 00:00:00 2001 From: tilpner Date: Mon, 23 Apr 2018 08:22:38 +0200 Subject: Restrict command triggers by disabling [] and {} in safe-read --- irc/bot.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'irc') diff --git a/irc/bot.rkt b/irc/bot.rkt index c0d9d22..abedd67 100644 --- a/irc/bot.rkt +++ b/irc/bot.rkt @@ -105,4 +105,10 @@ ; does this belong here? (define (safe-read-string s) (call-with-default-reading-parameterization - (thunk (read (open-input-string s))))) + (thunk + parameterize ([read-square-bracket-as-paren #f] + [read-curly-brace-as-paren #f] + [read-accept-compiled #f] + [read-accept-reader #f] + [read-accept-lang #f]) + (read (open-input-string s))))) -- cgit v1.2.3