1
mirror of https://github.com/rclone/rclone synced 2024-12-27 19:43:48 +01:00

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.
This commit is contained in:
Nick Craig-Wood 2021-03-24 17:57:34 +00:00
parent 629a3eeca2
commit cb30a8c80e

View File

@ -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")
}