[#3053] No auth check in StaticFEController, even on non-federating instances. Adjusted tests.
This commit is contained in:
parent
0d575735bf
commit
f6024252ae
9 changed files with 162 additions and 134 deletions
|
|
@ -10,14 +10,14 @@ defmodule Pleroma.Web.Feed.TagController do
|
|||
alias Pleroma.Web.Feed.FeedView
|
||||
|
||||
def feed(conn, params) do
|
||||
unless Pleroma.Config.restrict_unauthenticated_access?(:activities, :local) do
|
||||
unless Config.restrict_unauthenticated_access?(:activities, :local) do
|
||||
render_feed(conn, params)
|
||||
else
|
||||
render_error(conn, :not_found, "Not found")
|
||||
end
|
||||
end
|
||||
|
||||
def render_feed(conn, %{"tag" => raw_tag} = params) do
|
||||
defp render_feed(conn, %{"tag" => raw_tag} = params) do
|
||||
{format, tag} = parse_tag(raw_tag)
|
||||
|
||||
activities =
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ defmodule Pleroma.Web.Feed.UserController do
|
|||
end
|
||||
end
|
||||
|
||||
def render_feed(conn, %{"nickname" => nickname} = params) do
|
||||
defp render_feed(conn, %{"nickname" => nickname} = params) do
|
||||
format = get_format(conn)
|
||||
|
||||
format =
|
||||
if format in ["rss", "atom"] do
|
||||
if format in ["atom", "rss"] do
|
||||
format
|
||||
else
|
||||
"atom"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue