Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SSL] Using public hotspots with registration portals might be a problem for oc client connection #3120

Open
godfuture opened this issue Apr 15, 2015 · 8 comments
Assignees
Milestone

Comments

@godfuture
Copy link

godfuture commented Apr 15, 2015

Open, public hotspots often require to first login to a portal. After login, a dns timeout occurs and normally internet is available.

But before the login on portal was done, oc client opens cert validation dialog. the shown cert is not the one of the server, but of the portal. I usually decline the dialog, because I will do the login and accepting this cert is then not required.

portal_cert_shown_in_oc_client

Problem: after login, when internet is available, I am not able to connect my oc client to server. Clicking login does not show any action. Nothing happens.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/11241768-ssl-using-public-hotspots-with-registration-portals-might-be-a-problem-for-oc-client-connection?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F216457&utm_medium=issues&utm_source=github).
@godfuture godfuture changed the title Relogging not possible Using public hotspots with registration portals might be a problem for oc client connection Apr 15, 2015
@guruz guruz added this to the 1.9 - Multi-account milestone Apr 16, 2015
@guruz guruz added the type:bug label Apr 16, 2015
@guruz guruz changed the title Using public hotspots with registration portals might be a problem for oc client connection [SSL] Using public hotspots with registration portals might be a problem for oc client connection Apr 16, 2015
@danimo
Copy link
Contributor

danimo commented Jul 16, 2015

The question is: what do we want here?

  1. The popup showing up is usually never right, in particular after restart -> Never show it by default but only if you actively sign in (the fact that the error message is hideous is another problem, documented in another task, the number of which I do not have readily available)
  2. You want to sign into the hotspot: Of course, but only a few OSes have APIs for that. We should call those APIs where they exist (IIRC mac), and just wait for the user to auth through a browser, i.e. keep retrying silently.

Bonus points: Shibboleth opens a webview, and has the same problem. But that's for later.

/cc @jancborchardt

@jancborchardt
Copy link
Member

@danimo yeah, probably retry silently, and all the other things you say. Never show this popup. It’s not really our job to show a page of 192.168.0.1 so ppl can log in.

@dragotin dragotin modified the milestones: 2.0.1-next, 2.0 - Multi-account Jul 29, 2015
@danimo danimo modified the milestones: 2.1-next, 2.0.2-next Sep 14, 2015
@guruz guruz assigned guruz and unassigned danimo Oct 30, 2015
@guruz guruz modified the milestones: 2.1.1-nextpatch, 2.1-current Nov 18, 2015
@danimo danimo modified the milestones: 2.2-nextminor, 2.1.1-current Jan 7, 2016
@danimo danimo modified the milestones: 2.2.0-current, backlog Feb 22, 2016
@plinss
Copy link

plinss commented Mar 21, 2016

Probably also related to #203 DNS caching issue. Hotspot most likely gives spoofed IP address for first lookup, if the client caches that IP it will fail to connect after the internet connection is properly established.

@guruz
Copy link
Contributor

guruz commented Sep 11, 2017

As a first fix, in sslAuthenticatioRequired we should check if we're coming from the ConnectionValidator or from a regular request.
In case of the regular request, we could just go into a timeout state.
Then until the ConnectionValidator is checking again we might be connected already to the captive portal.

FYI @ckamm @ogoffart

@guruz guruz modified the milestones: 2.5.0, 2.6.0 Mar 27, 2018
@felixboehm felixboehm added p3-medium Normal priority and removed sev2-high labels May 3, 2018
@ogoffart
Copy link
Contributor

ogoffart commented Dec 3, 2018

we should check if we're coming from the ConnectionValidator or from a regular request.
In case of the regular request, we could just go into a timeout state.

That would only work if there is only one host. With direct URL or redirection, there may be several host, specific to some files. In which case we might have another certificate for them to accept.
But this is not the common case.

Yet, it would not solve the problem. because the connectionvalidator will then run quickly after that and show this dialog.

I don't really know what we can do.
Try again to open a connection from the dialog every minute, and if the connection works, then restart the connection?

@guruz
Copy link
Contributor

guruz commented Dec 11, 2018

@ogoffart I didn't mean to check for any hosts or redirection.
Just check which code path we're from, e.g. tag the QNetworkReply with something.

I had commented over one year ago so I don't remember in detail what I imagined.

But I think it was something about NOT showing the scary dialog immediately if this account was connected before (in the same session) and the request is a regular request.
So one would still see the scary dialog if one starts the client freshly.

@guruz guruz modified the milestones: 2.6.0, 2.6.1 Apr 15, 2019
@amedranogil
Copy link

how about a "retry" option in the "SSL certificate incorrect" dialog, which the user may click after login?
This might also help on other cases when debugging SSL certificates on the server or other networking testing cases.

@arthurzenika
Copy link

This is also a problem when a nextcloud is behind a VPN.

@michaelstingl michaelstingl modified the milestones: 2.6.1, 2.6.2 Nov 26, 2019
@michaelstingl michaelstingl modified the milestones: 2.6.2, Backlog Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests