After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783506 - nextcloud: Detect 301 redirects from http to https
nextcloud: Detect 301 redirects from http to https
Status: RESOLVED OBSOLETE
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-07 11:59 UTC by Debarshi Ray
Modified: 2021-07-05 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Debarshi Ray 2017-06-07 11:59:14 UTC
When adding a Nextcloud account, unless one explicitly specifies the URI scheme, it assumes that it is HTTPS. However, if someone specifies HTTP, it will stick to it.

This leads to a strange problem with my.owndrive.com. Sending a GET request to http://my.owndrive.com/remote.php/webdav evokes a successful (200) response, which is fine. However, an OPTIONS request leads to a 301 redirect with the Location header set to https://my.owndrive.com/remote.php/webdav. ie. the HTTPS equivalent of the same URL.

Therefore, if one explicitly specifies HTTP in Settings -> Online Accounts, the account will be added because it uses GET requests. However, GVfs' WebDAV backend won't be able to mount it because it sends an OPTIONS request and the redirect handler refuses to grant the redirect request.

A quick reading of the WebDAV backend code makes me think that redirects are tied to G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS. So, while we might be able to make the backend deal with this, it might be easier to teach g-o-a to detect this when adding the account and only advertise the HTTPS URL.
Comment 1 GNOME Infrastructure Team 2021-07-05 10:58:59 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/

Thank you for your understanding and your help.