Skip to content

Commit

Permalink
WebAdmin: Use lowercase username and server authentication credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Dec 17, 2024
1 parent 2b02af1 commit da06a50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ejabberd_web_admin.erl
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ get_auth_admin(Auth, HostHTTP, RPath, Method) ->
{SJID, Pass} ->
{HostOfRule, AccessRule} = get_acl_rule(RPath, Method),
try jid:decode(SJID) of
#jid{user = <<"">>, server = User} ->
#jid{luser = <<"">>, lserver = User} ->
case ejabberd_router:is_my_host(HostHTTP) of
true ->
get_auth_account(HostOfRule, AccessRule, User, HostHTTP,
Pass);
_ ->
{unauthorized, <<"missing-server">>}
end;
#jid{user = User, server = Server} ->
#jid{luser = User, lserver = Server} ->
get_auth_account(HostOfRule, AccessRule, User, Server,
Pass)
catch _:{bad_jid, _} ->
Expand Down

0 comments on commit da06a50

Please sign in to comment.