From cb30a8c80e339ce011bbdacd4c459b90cf5eb2a4 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 24 Mar 2021 17:57:34 +0000 Subject: [PATCH] webdav: fix sharepoint auth over http - fixes #4418 Before this change rclone would auth over https even when the server was configured with http. Authing over http obviously isn't ideal, however this type of server is on-premise and doesn't work over https. --- backend/webdav/odrvcookie/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/webdav/odrvcookie/fetch.go b/backend/webdav/odrvcookie/fetch.go index ececd07c5..5e7f84bf9 100644 --- a/backend/webdav/odrvcookie/fetch.go +++ b/backend/webdav/odrvcookie/fetch.go @@ -125,7 +125,7 @@ func (ca *CookieAuth) getSPCookie(conf *SharepointSuccessResponse) (*CookieRespo return nil, errors.Wrap(err, "Error while constructing endpoint URL") } - u, err := url.Parse("https://" + spRoot.Host + "/_forms/default.aspx?wa=wsignin1.0") + u, err := url.Parse(spRoot.Scheme + "://" + spRoot.Host + "/_forms/default.aspx?wa=wsignin1.0") if err != nil { return nil, errors.Wrap(err, "Error while constructing login URL") }