From: Ivan Tashkinov Date: Thu, 6 Aug 2020 13:00:00 +0000 (+0300) Subject: [#2025] Defaulted OAuth login scopes choice to all scopes when user selects no scopes. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=135ae4e35a3e6a084eb611ce3a21c7a6c6bba9fc;p=akkoma [#2025] Defaulted OAuth login scopes choice to all scopes when user selects no scopes. --- diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index f29b3cb57..dd00600ea 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -76,6 +76,13 @@ defmodule Pleroma.Web.OAuth.OAuthController do available_scopes = (app && app.scopes) || [] scopes = Scopes.fetch_scopes(params, available_scopes) + scopes = + if scopes == [] do + available_scopes + else + scopes + end + # Note: `params` might differ from `conn.params`; use `@params` not `@conn.params` in template render(conn, Authenticator.auth_template(), %{ response_type: params["response_type"],