Skip to content

RP initiated logout makes backchannel logout throw an HTTP/400 error #1430

@Spitfireap

Description

@Spitfireap

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Logout from the RP (Nextcloud) with backchannel logout enabled on the IdP
  2. Agree to disconnect on the IdP interface
  3. Backchannel logout will likely throw an error 400

Expected behaviour

Actual behaviour

Backchannel logout will almost every time return an HTTP/400 error when doing a RP-initiated logout.

Explaination

The issue is that the error HTTP 400 will then be thrown to the IdP during the backchannel logout due to the session not being found since the session has been deleted here.
The IdP I am using (LemonLDAP) is registering the error and inform the user a possible error occured. Of course everything is fine :

Image

The RFC does state that a success HTTP/200 should be returned :
If the identified End-User is already logged out at the RP when the logout request is received, the logout is considered to have succeeded.

Proposed fix

  • Make the response an HTTP/200 if no session are found ;
  • Optionally: have a debug checkbox in the provider option to enable this behavior but have it disabled by default. The checkbox could be general so it could be use for later use.

I can try to push a PR if you take somebody's first NC related PR :)

Server configuration

Web server: Nginx

Database: PostgreSQL

PHP version: 8.4

Nextcloud version: 33.0.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions