From a3edbca2094870f34377b38ab354d19309cbb57e Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 28 Jun 2020 17:09:41 +0200 Subject: [PATCH] Make sure to strip key/value of whitespace in lockfunc kwargs. Resolves #2150 --- evennia/locks/lockhandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/locks/lockhandler.py b/evennia/locks/lockhandler.py index 0f96b1d6a7..19e0617bf0 100644 --- a/evennia/locks/lockhandler.py +++ b/evennia/locks/lockhandler.py @@ -236,7 +236,7 @@ class LockHandler(object): elist.append(_("Lock: lock-function '%s' is not available.") % funcstring) continue args = list(arg.strip() for arg in rest.split(",") if arg and "=" not in arg) - kwargs = dict([arg.split("=", 1) for arg in rest.split(",") if arg and "=" in arg]) + kwargs = dict([(part.strip() for part in arg.split("=", 1)) for arg in rest.split(",") if arg and "=" in arg]) lock_funcs.append((func, args, kwargs)) evalstring = evalstring.replace(funcstring, "%s") if len(lock_funcs) < nfuncs: