diff options
Diffstat (limited to 'util/sasl')
-rw-r--r-- | util/sasl/oauthbearer.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/sasl/oauthbearer.lua b/util/sasl/oauthbearer.lua index ea8da198..54c63575 100644 --- a/util/sasl/oauthbearer.lua +++ b/util/sasl/oauthbearer.lua @@ -34,6 +34,10 @@ local function oauthbearer(self, message) local username = jid.prepped_split(gs2_authzid); + if not username or username == "" then + return "failure", "malformed-request", "Expected authorization identity in the username@hostname format"; + end + -- SASLprep username username = saslprep(username); |