RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.16k stars 10.38k forks source link

[Rocket.Chat+.App] Invalid url #2677

Closed netdevfighter closed 8 years ago

netdevfighter commented 8 years ago

rocketchat

The URL pattern is not correct implemented.

Your Rocket.Chat version: 0.24.0 Client version: latest of Apple store

engelgabriel commented 8 years ago

@netdevfighter are you sure http://srv-rc-test.bs.kae.de.oneandone.net/ is accessible? The message is not saying that the URL is bad formatted, but it is saying that it didn't find a valid Rocket.Chat instance.

@rodrigok maybe we can make the error message more clear? "No valid instance found at the url" "INVALID RESPONCE"

netdevfighter commented 8 years ago

That's confused me ...

My input was "https://srv-rc-test.bs.kae.de.oneandone.net" also with https. After the click on the connect button I get the url back without 's'.

Some more detials about this box:

tlindenmann@bluefire:/opt/rocketchat$ host srv-rc-test.bs.kae.de.oneandone.net
srv-rc-test.bs.kae.de.oneandone.net is an alias for et-0.srv-rc-test.bs.kae.de.oneandone.net.
et-0.srv-rc-test.bs.kae.de.oneandone.net has address 172.20.39.136
tlindenmann@bluefire:/opt/rocketchat$ nmap srv-rc-test.bs.kae.de.oneandone.net

Starting Nmap 6.40 ( http://nmap.org ) at 2016-03-29 18:12 CEST
Nmap scan report for srv-rc-test.bs.kae.de.oneandone.net (172.20.39.136)
Host is up (0.056s latency).
rDNS record for 172.20.39.136: et-0.srv-rc-test.bs.kae.de.oneandone.net
Not shown: 995 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
443/tcp  open  https
3000/tcp open  ppp

Nmap done: 1 IP address (1 host up) scanned in 0.81 seconds

Has the application problem with a cname?

The website-url is configured to "https://srv-rc-test.bs.kae.de.oneandone.net"

engelgabriel commented 8 years ago

Is this a private network? I can't access from here.

This site can’t be reached

srv-rc-test.bs.kae.de.oneandone.net’s server DNS address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
netdevfighter commented 8 years ago

@engelgabriel Yes, is a private network (RFC1918). Is only internal reachable inside of the company.

engelgabriel commented 8 years ago

Ok, so I presume you can open the URL https://srv-rc-test.bs.kae.de.oneandone.net in your browsers and use Rocket.Chat with no problems?

netdevfighter commented 8 years ago

Yes, works fine without problems.

rocketchatrunning

For installation I've used the ansible script.

Let me know if you need more information.

rodrigok commented 8 years ago

@netdevfighter: Your HTTPS is invalid, if your instance is not reachable via HTTP the app will not connect to your instance.

engelgabriel commented 8 years ago

The mobile and desktop app to not accept self signed certificates.

engelgabriel commented 8 years ago

That's why we try to access the URL without SSL after failing on HTTPS.

netdevfighter commented 8 years ago

Ok, but the error message is in this point incorrect.

Is it not possible to irgnore this maybe with configuration field (checkbox)? Or can I import the ca-certificates of self signed certificates?

netdevfighter commented 8 years ago

The app works with http://srv-rc-test.bs.kae.de.oneandone.net:3000

The problem with the other url was the redirect to https from nginx.

engelgabriel commented 8 years ago

Yes, if you want to use self-signed certificates, you have to install the certificate in your OS.

There is no way to allow this to be bypassed, it is a security decision on Electron.

Why dont you use a Let's Encrypt certificate?

netdevfighter commented 8 years ago

I wanted to test the chat first and later I will use a internal certificate.

Thanks for your help.

engelgabriel commented 8 years ago

Makes sense, but you need to test without SSL in that case.

netdevfighter commented 8 years ago

:+1: An clear error message would have been desirable. ;)

Keep it up.

engelgabriel commented 8 years ago

Agreed, I have changed the error message. But the browser dont give a error code for invalid SSL certificate, it just return an error :( so there is not much we can work if.

ma-karai commented 8 years ago

I had a similar problem, for me i have two domains DomainA.com hosts the RC instance and DomainB.com justs forwards to DomainA.com.

What works is, i have to directly input DomainA.com into the app in order to connect via the app. If i input DomainB.com it doesnt work. Of course both domains work in a regular browser.