projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'docs/storing-remote-media' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
ostatus
/
ostatus_controller.ex
diff --git
a/lib/pleroma/web/ostatus/ostatus_controller.ex
b/lib/pleroma/web/ostatus/ostatus_controller.ex
index 01ec7941e5f6517700166f9ca28badedf2870984..6971cd9f8c12ee05c00b82c240b07c34aa684da8 100644
(file)
--- a/
lib/pleroma/web/ostatus/ostatus_controller.ex
+++ b/
lib/pleroma/web/ostatus/ostatus_controller.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OStatus.OStatusController do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OStatus.OStatusController do
@@
-16,6
+16,10
@@
defmodule Pleroma.Web.OStatus.OStatusController do
alias Pleroma.Web.Metadata.PlayerView
alias Pleroma.Web.Router
alias Pleroma.Web.Metadata.PlayerView
alias Pleroma.Web.Router
+ plug(Pleroma.Plugs.EnsureAuthenticatedPlug,
+ unless_func: &Pleroma.Web.FederatingPlug.federating?/1
+ )
+
plug(
RateLimiter,
[name: :ap_routes, params: ["uuid"]] when action in [:object, :activity]
plug(
RateLimiter,
[name: :ap_routes, params: ["uuid"]] when action in [:object, :activity]
@@
-135,13
+139,13
@@
defmodule Pleroma.Web.OStatus.OStatusController do
end
end
end
end
- def errors(conn, {:error, :not_found}) do
+ def
p
errors(conn, {:error, :not_found}) do
render_error(conn, :not_found, "Not found")
end
render_error(conn, :not_found, "Not found")
end
- def errors(conn, {:fetch_user, nil}), do: errors(conn, {:error, :not_found})
+ def
p
errors(conn, {:fetch_user, nil}), do: errors(conn, {:error, :not_found})
- def errors(conn, _) do
+ def
p
errors(conn, _) do
render_error(conn, :internal_server_error, "Something went wrong")
end
end
render_error(conn, :internal_server_error, "Something went wrong")
end
end