Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent automatic OAuth grants for public clients #30790

Commits on Apr 30, 2024

  1. Prevent automatic OAuth grants for public clients

    As detailed in Section 10.2 of RFC 6749 (The OAuth 2.0 Authorization
    Framework):
    > The authorization server SHOULD NOT process repeated authorization
    > requests automatically (without active resource owner interaction)
    > without authenticating the client [...].
    
    Prior to this commit, Gitea would automatically issue authorization
    codes if the user previously granted access to the specific client.
    Especially with pre-registered OAuth clients using loopback interface
    redirects (like `git-credential-oauth`), this makes it possible for
    malicious applications with access to the same loopback interface and
    the ability to open a URL using the user's browser to impersonate public
    clients and get access to the user's account without manual interaction.
    
    This patch simply introduces an additional condition that prevents
    automatic grants if the application is not confidential.
    archer-321 committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    e8bc0f8 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Configuration menu
    Copy the full SHA
    586e645 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f7a8a1a View commit details
    Browse the repository at this point in the history