Unable to post an URL with a closing bracket at the end. POST api/v1/statuses returns 500
Environment
- Installation type (OTP or From Source): Source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.3.50-496-a8adc300-fedi-absturztau-be
- Elixir version (
elixir -v
for from source installations, N/A for OTP): Elixir 1.10.4 (compiled with Erlang/OTP 22) - Operating system: debian 10
- PostgreSQL version (
psql -V
): 11.12
Bug description
trying to post http://example.com)
fails with an internal server error.
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: 09:45:53.564 [error] #PID<0.22084.906> running Pleroma.Web.Endpoint (connection #PID<0.25968.906>, stream id 1) terminated
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: Server: fedi.absturztau.be:80 (http)
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: Request: POST /api/v1/statuses
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: ** (exit) an exception was raised:
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: ** (FunctionClauseError) no function clause matching in String.contains?/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (elixir 1.10.4) lib/string.ex:2216: String.contains?(nil, "/")
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (linkify 0.5.0) lib/linkify/parser.ex:245: Linkify.Parser.parens_found_path_separator/1
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (linkify 0.5.0) lib/linkify/parser.ex:224: Linkify.Parser.maybe_strip_parens/1
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (linkify 0.5.0) lib/linkify/parser.ex:440: Linkify.Parser.check_and_link_reducer/4
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (elixir 1.10.4) lib/enum.ex:3686: Enumerable.List.reduce/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (elixir 1.10.4) lib/enum.ex:2161: Enum.reduce_while/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (linkify 0.5.0) lib/linkify/parser.ex:165: Linkify.Parser.do_parse/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (linkify 0.5.0) lib/linkify/parser.ex:72: Linkify.Parser.parse/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/formatter.ex:99: Pleroma.Formatter.linkify/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/common_api/utils.ex:265: Pleroma.Web.CommonAPI.Utils.format_input/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/common_api/utils.ex:218: Pleroma.Web.CommonAPI.Utils.make_content_html/1
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/common_api/activity_draft.ex:162: Pleroma.Web.CommonAPI.ActivityDraft.content/1
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/common_api/activity_draft.ex:56: Pleroma.Web.CommonAPI.ActivityDraft.create/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/common_api.ex:399: Pleroma.Web.CommonAPI.post/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/mastodon_api/controllers/status_controller.ex:169: Pleroma.Web.MastodonAPI.StatusController.create/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/mastodon_api/controllers/status_controller.ex:5: Pleroma.Web.MastodonAPI.StatusController.action/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/mastodon_api/controllers/status_controller.ex:5: Pleroma.Web.MastodonAPI.StatusController.phoenix_controller_pipeline/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (phoenix 1.5.9) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (pleroma 2.3.50-496-ge3c6b447-fedi-absturztau-be) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.call/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (phoenix 1.5.9) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (cowboy 2.9.0) /opt/pleroma/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (cowboy 2.9.0) /opt/pleroma/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (cowboy 2.9.0) /opt/pleroma/deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3
Jul 02 09:45:53 taube-alpha-centauri mix[19909]: (stdlib 3.14.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3