500 error only when accessing direct link to a status (with Static FE enabled)
@mjc1 found this
Sep 28 22:17:34 liewrap04 pleroma: request_id=FjkSeVCzDZae04AAEsuB [error] Internal server error: %Floki.ParseError{message: :badmatch}
Sep 28 22:17:34 liewrap04 pleroma: request_id=FjkSeVCzDZae04AAEsuB [info] Converted error Floki.ParseError to 500 response
Sep 28 22:17:34 liewrap04 pleroma: [error] #PID<0.11859.5> running Pleroma.Web.Endpoint (connection #PID<0.11858.5>, stream id 1) terminated#012Server: asfr.social:80 (http)#012Request: GET /notice/9zdBeltxFV6iW3aRxw#012** (exit) an exception was raised:#012 ** (Protocol.UndefinedError) protocol Phoenix.HTML.Safe not implemented for %{errors: %{detail: "Internal server error"}} of type Map. This protocol is implemented for the following type(s): Decimal, BitString, List, DateTime, Phoenix.HTML.Form, Time, Atom, Tuple, Float, Date, Integer, NaiveDateTime#012 (phoenix_html 2.14.2) lib/phoenix_html/safe.ex:1: Phoenix.HTML.Safe.impl_for!/1#012 (phoenix_html 2.14.2) lib/phoenix_html/safe.ex:15: Phoenix.HTML.Safe.to_iodata/1#012 (phoenix 1.4.17) lib/phoenix/controller.ex:776: Phoenix.Controller.__put_render__/5#012 (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:77: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5#012 (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5#012 (phoenix 1.4.17) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4#012 (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2#012 (cowboy 2.8.0) /builds/pleroma/pleroma/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
Sep 28 22:17:42 liewrap04 pleroma: request_id=FjkSezV2wzYrK3QAEsuh [error] Internal server error: %Floki.ParseError{message: :badmatch}
I observed that I cannot access https://asfr.social/notice/9zdBfRCThXHmbNZK1w directly, but I can go to https://asfr.social and then choose that status from the local timeline and it works.
@i1t are we enforcing restrictions on Referrer header or something when an instance has restrictions?
@mjc1 can you clarify all the settings you enabled to restrict public access?
@i1t's edit: The issue is in Pleroma.Web.StaticFE.StaticFEController.show/2
, see #2199 (comment 74413)
Edited by Ivan Tashkinov