ChatSecure-iOS icon indicating copy to clipboard operation
ChatSecure-iOS copied to clipboard

File Transfer OMEMO - Not requesting a http_upload slot

Open ar4121 opened this issue 8 years ago • 8 comments

Is there some way to get the logs for chatsecure?

I am having problems sending images/files from a new iphone (iphone 8+ I think, everything up to date and current, and up to date ChatSecure app)

Server is ejabberd 18.01, up to date. Using mod_http_upload. The certificate is a wildcard SSL from comodo.

It seems that ChatSecure never requests an upload slot to the server. Monal on the same iphone sends images fine (request slot, upload image, send image). Conversations client can send an image via mod_http_upload to the iphone, and chatsecure recieves the image fine. Both phones can chat both in plaintext and omemo encrypted through text.

The server passes the ejabberd-compliance tester written by D.Gultsch, both in Omemo and mod_http_upload.

Even with plaintext I can't get the chatsecure app to request a upload slot. The only error that I can really see in my ejabberd logs is this

ejabberd_s2s_in:handle_auth_failure:204 (tls|<0.1810.0>) Failed inbound s2s EXTERNAL authentication pubsub.chatsecure.org -> my-domain.com (fff....address here): unable to get local issuer certificate Though outbound S2S is fine, I don't think this is the issue. I think this might have to do with having my tls parameters strict. Either way, the other clients don't seem to have an issue with it.

Server passes the test in both s2s and c2s in the IM Observatory (https://check.messaging.one)

Anyone have any ideas here? Thanks!

ar4121 avatar Jan 19 '18 17:01 ar4121

Logs are intentionally disabled in production builds and there's no way to manually enable them at the moment. What happens when you go to Settings -> Account -> Server Information? You should see a green check for XEP-0363.

chrisballinger avatar Jan 19 '18 18:01 chrisballinger

Everything is green.

https://postimg.org/image/ukbre2qct/

ar4121 avatar Jan 19 '18 19:01 ar4121

Is there a particular server you recommend that has mod http_upload enabled? At this point, I can't go any further because chatsecure isn't requesting an upload slot according to my ejabberd logs. Monal on the same device with the same settings seems to work fine.

I can attempt to use another server with chatsecure and my conversations client, that might give a better indication if it is something in my server or if it is in chatsecure. I don't have another iOS device to test with unfortunately. I know there are a bunch, but I don't know of very many public ones that support mod httpd_upload

ar4121 avatar Jan 19 '18 19:01 ar4121

Maybe try creating an account on the zom.im server? I think the default server list only includes servers that support xep-0363

The only reason it wouldn't request an upload slot is if it thinks the server doesn't support it, but since there's a green checkmark then I'm not sure what's going wrong there.

chrisballinger avatar Jan 19 '18 19:01 chrisballinger

So I created an account on conversations.im, and sure enough it does work. It sends to my server and vice versa. So my server is at fault.

I'm thinking maybe it is a hostname/dns issue. I'm not sure at this point. I do have the uploads on a different sub domain, and since I can't really examine the logs of chatsecure, I can't see where it is requesting the slots.

Thanks again, if you can think of anything I'd appreciate it.

ar4121 avatar Jan 19 '18 19:01 ar4121

double-check that your certificate of the service / subdomain is valid, although i guess it should be if its a wildcard

chrisballinger avatar Jan 19 '18 20:01 chrisballinger

The wildcard shows valid, at least according to check.messaging.one, and a quick openssl s_client test.

I'm thinking it has to be a domain/subdomain issue, because I don't get any requests in my logs from chatsecure that show it to be requesting an upload slot. my server's fqdn is on xmpp.domain and my uploads go to upload.domain, so would chatsecure decline the request if it doesn't have the certs for upload.domain pinned and accepted already? I suppose it could be a certificate issue, since I can upload from Monal but not chatsecure. Does chatsecure require a pinned cert before communication can occur c2s?

Thanks again btw.

ar4121 avatar Jan 19 '18 20:01 ar4121

Slot request still goes thru your existing stream

	//	<iq from='[email protected]/garden' id='step_03'
	//		  to='upload.montague.tld' type='get'>
	//	   <request xmlns='urn:xmpp:http:upload'>
	//		  <filename>my_juliet.png</filename>
	//		  <size>23456</size>
	//		  <content-type>image/jpeg</content-type>
	//	   </request>
	//	</iq>

chrisballinger avatar Jan 19 '18 20:01 chrisballinger