android icon indicating copy to clipboard operation
android copied to clipboard

No verification of the provided SSL certificate

Open canihavesomecoffee opened this issue 11 years ago • 4 comments

Expected behaviour

The SSL certificate should be checked against a stored one, to prevent MITM attacks that have a wildcard/global valid certificate. This is implemented by a lot of companies, including competitors like DropBox (https://blogs.dropbox.com/dropbox/2014/06/weve-got-your-back/).

Actual behaviour

OwnCloud app runs as usual, not doing anything.

Steps to reproduce

Prerequisites:

  • Charles Proxy
  • Android which has the proxy set and Charles root certificate installed
  1. Open up the OwnCloud Android client
  2. Check in Charles Proxy for requests (over HTTPS) to the status.php, which contains the basic authorization

owncloud

Environment data

Android version: global (4.2.2 in my case) Device model: global (Acer V370) Stock or customized system: Stock ownCloud app version: 1.7.0 ownCloud server version: 8.0.2

Logs

Web server error log

N/A

ownCloud log (data/owncloud.log)

N/A

Proposed solution

My proposal to fix this issue would be storing the certificate (or signatures of them at least) when you are configuring the app (first login), and subsequently check the provided certificate of the server before sending any important data. If the certificate does not match, warn the user or fail the connection.

canihavesomecoffee avatar Mar 29 '15 15:03 canihavesomecoffee

@davivel @masensio Any plans/comments on this? This is a quite serious issue in my opinion...

canihavesomecoffee avatar Apr 20 '15 12:04 canihavesomecoffee

:+1: An example project can be found here: https://github.com/ikust/hello-pinnedcerts

akalypse avatar May 02 '15 16:05 akalypse

:+1: for pinning certs.

It would be nice to also be able to pin certificates of your own OwnCloud servers by putting the hash in a settings option. This way you do not have the proposed "Trust on first use" approach as suggested by @canihavesomecoffee.

The TOFU way has some problems, when web admins may switch the certificates - which would cause the sites to be inaccessible. Actually the TOFU should still be used - IMHO in addition to the first approach, but at least implement this one: Add HTTP Public Key Pinning support

Because HPKP is actually a standard for pinning certificates on first use. It is proven to work in current browsers and it mitigates the "certificate switch" issue. (Read something about HPKP to see how) And it can certainly be implemented in OwnCloud. And of course it is good to rely on standards.


BTW: The title implies bad things. Actually the cert is verified (against the root certs), but no key pinning is used. So the title should be changed to "Implement key pinning for HTTPS" or something similar.

rugk avatar May 10 '16 18:05 rugk

🤖 Automated issue triage by Claude Code review agent.

This issue was opened before 2020 and has had no activity since then, so we are closing it as outdated. If this is still relevant on a current ownCloud release, please reopen (or open a fresh issue) with up-to-date details — thank you!

DeepDiver1975 avatar Jun 26 '26 19:06 DeepDiver1975