From b674d556e78be3aad723db2a2b6005d78296bb53 Mon Sep 17 00:00:00 2001 From: duponin Date: Mon, 8 May 2023 10:31:02 +0200 Subject: [PATCH 1/2] invalid oauth credentials returns a 401, not a 400 fix #386 --- lib/pleroma/web/o_auth/o_auth_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/o_auth/o_auth_controller.ex b/lib/pleroma/web/o_auth/o_auth_controller.ex index c1fb4f378..574348d2c 100644 --- a/lib/pleroma/web/o_auth/o_auth_controller.ex +++ b/lib/pleroma/web/o_auth/o_auth_controller.ex @@ -628,6 +628,6 @@ defmodule Pleroma.Web.OAuth.OAuthController do end defp render_invalid_credentials_error(conn) do - render_error(conn, :bad_request, "Invalid credentials") + render_error(conn, :unauthorized, "Unauthorized") end end From 417994818a90ab0911b0ecb74766514607f3065b Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Mon, 27 May 2024 19:57:30 +0400 Subject: [PATCH 2/2] Add changelog --- changelog.d/return-correct-oauth-error.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/return-correct-oauth-error.fix diff --git a/changelog.d/return-correct-oauth-error.fix b/changelog.d/return-correct-oauth-error.fix new file mode 100644 index 000000000..6473cc88b --- /dev/null +++ b/changelog.d/return-correct-oauth-error.fix @@ -0,0 +1 @@ +Return 401 for invalid oauth credentials