]> granicus.if.org Git - ejabberd/commitdiff
Fix handling mod_http_upload disco#info queries: need decoded elements
authorBadlop <badlop@process-one.net>
Mon, 21 Nov 2016 11:06:11 +0000 (12:06 +0100)
committerBadlop <badlop@process-one.net>
Mon, 21 Nov 2016 11:06:11 +0000 (12:06 +0100)
As reported in
https://www.ejabberd.im/forum/28605/ejabberd-modhttpupload-error-405-not-allowed

src/mod_http_upload.erl

index 6ad18531cd87f71d36fd4d5e457d0a20e57df757..1abde4f5bca742a956bf274ba9ea8f618b5ca37e 100644 (file)
@@ -360,7 +360,8 @@ handle_cast(Request, State) ->
 
 -spec handle_info(timeout | _, state()) -> {noreply, state()}.
 
-handle_info({route, From, To, #iq{} = IQ}, State) ->
+handle_info({route, From, To, #iq{} = Packet}, State) ->
+    IQ = xmpp:decode_els(Packet),
     {Reply, NewState} = case process_iq(From, IQ, State) of
                            R when is_record(R, iq) ->
                                {R, State};