util.prosodyctl: Enforce strict JID validation on user creation
This is where 64ddcbc9a328 should have started. By preventing creation
of users with invalid JIDs, it will slowly become safer to enforce
strict validation on everything.
--- a/util/prosodyctl.lua Fri Nov 01 22:08:38 2019 +0100
+++ b/util/prosodyctl.lua Fri Nov 01 22:53:14 2019 +0100
@@ -134,7 +134,7 @@
-- Server control
local function adduser(params)
- local user, host, password = nodeprep(params.user), nameprep(params.host), params.password;
+ local user, host, password = nodeprep(params.user, true), nameprep(params.host), params.password;
if not user then
return false, "invalid-username";
elseif not host then