Skip to content

Add hint in 401 response when regular password is disabled (2FA) #25091

Closed

Description

@PVince81

When two factor auth is enabled, Webdav doesn't accept regular login/password but only tokens.
In order for the clients to be able to display a useful message for users, the server should return additional info in the 401 Webdav response.

The current 401 response looks like this:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is mis-configured</s:message>
</d:error>

So either use another exception name or try adding a "s:reason" block with a message or a hint that the client can parse.

@ChristophWurst @ogoffart @dragotin

Activity

  1. added this to the milestone on Jun 14, 2016
  2. lock commented on Aug 4, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  3. locked as resolved and limited conversation to collaborators on Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions