Software /
code /
prosody
Diff
util/prosodyctl.lua @ 10367:649acbfbf7fe
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 01 Nov 2019 22:53:14 +0100 |
parent | 10209:e6ba8bb91905 |
child | 10536:a469d2bcea96 |
line wrap: on
line diff
--- 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