Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 34,942
    • Issues 34,942
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,268
    • Merge Requests 1,268
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #206912

Closed
Open
Opened Feb 17, 2020 by Andreas Erhard@xelan

Do not require CSRF token for logout

Summary

In !22113 (merged), the HTTP method for sign out was changed from GET to POST. However, in addition to the method change the sign out now requires a valid CSRF token. This prevents to sign out from another application.

Steps to reproduce

Try to log out via a HTML form which has the POST method and the sign out route as action:

<form action="https://gitlab.example.com/users/sign_out" method="post">
    <button>Sign out</button>
</form>

What is the current bug behavior?

Gitlab responds with a HTTP error 422 and the message "The change you requested was rejected." as no valid CSRF token can be provided.

What is the expected correct behavior?

The sign out is performed successfully.

Relevant logs and/or screenshots

gitlab

Possible fixes

The logout should not require a CSRF token, as discussed in Gitlab-FOSS issue 39708.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab#206912