Skip to content

Commit fc879db

Browse files
committed
Fix component IsValidFromJid returning non boolean
When check_from is set to `false` the function IsValidFromJid returned `ok` which can not be matched in downstream processing and resulted in `{badarg, ok}` to the function `andalso`
1 parent 909c516 commit fc879db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/component/mongoose_component_connection.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ handle_stream_established(StateData, #xmlel{name = Name} = El) ->
250250
%% If the admin does not want to check the from field when accept packets from any
251251
%% address. In this case, the component can send packet of behalf of the server users.
252252
_ ->
253-
ok
253+
true
254254
end,
255255
ToJid = jid:from_binary(exml_query:attr(El, <<"to">>, <<>>)),
256256
IsStanza = (<<"iq">> =:= Name)

0 commit comments

Comments
 (0)