-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Milestone
Description
Bug description
An invalid username will crash the ejabberd_oauth process.
See:
ejabberd/src/ejabberd_oauth.erl
Lines 597 to 598 in 6bd4399
| StringJID = proplists:get_value(<<"username">>, Q, <<"">>), | |
| #jid{user = Username, server = Server} = jid:decode(StringJID), |
Errors thrown by jid:decode(StringJID) will crash the process as they are not caught.
You can reproduce the issue by supplying a username that will trigger a tr0 case and set ret = 0 which return an error atom.
https://github.com/processone/xmpp/blob/master/c_src/jid.c
A malicious actor could keep submitting requests with an invalid username to cause DOS and prevent other users to log in.
Expected Behaviour
The process should not crash. The error should be handled in ejabberd_oauth
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels