Description
Hello Collaborators,
Describe the bug
When using OneDrive as the WebDav server things get weird. In short: The authentication fails because of Microsoft.
Software
- OS: Linux (Docker)
- Golang: 1.19.4
- Version: 60ec5ad
To Reproduce
- Create a client using OneDrive credentials
- Try to use any (authenticated) request (e.g.
ReadDir()
) - Response is empty / unexpected (e.g. no files)
Expected
At least an authentication error should be returned. Even better would be support for MS's need to be proprietary.
Additional context
Microsoft (as expected) does not follow industry standards and instead of returning 401
on unauthenticated requests they return 302
to redirect you to the login page. The login page then return a 200
status so the webdav client thinks it is a valid result for the original request. On its own this would not be too bad as you could catch the redirect and handle it like a 401
. But since Microsoft use their own authentication method (MS-PASS with Passport1.4
) you also need a new authenticator.