Merge pull request 'OAuth: require security scopes for /api/oauth_tokens' (#8013) from lambadalambda/pleroma:fix/oauth-tokens-scopes into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/8013
This commit is contained in:
commit
745926189f
4 changed files with 50 additions and 22 deletions
|
|
@ -13,7 +13,8 @@ defmodule Pleroma.Web.OAuth.TokenController do
|
|||
require Logger
|
||||
|
||||
plug(:skip_auth when action == :confirm_email)
|
||||
plug(:skip_plug, OAuthScopesPlug when action in [:oauth_tokens, :revoke_token])
|
||||
plug(OAuthScopesPlug, %{scopes: ["read:security"]} when action == :oauth_tokens)
|
||||
plug(OAuthScopesPlug, %{scopes: ["write:security"]} when action == :revoke_token)
|
||||
|
||||
action_fallback(:errors)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue