Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 655
    • Issues 655
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 100
    • Merge requests 100
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PleromaPleroma
  • pleromapleroma
  • Issues
  • #2275
Closed
Open
Issue created Oct 30, 2020 by nik@nik

Kocaptcha broken

Environment

  • Installation type (OTP or From Source): Source
  • Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.1.2
  • Elixir version (elixir -v for from source installations, N/A for OTP): Elixir 1.10.4 (compiled with Erlang/OTP 22)
  • Operating system: Ubuntu 20.04
  • PostgreSQL version (psql -V): psql (PostgreSQL) 11.9 (Ubuntu 11.9-1.pgdg20.04+1)

Bug description

With the following configuration:

config :pleroma, Pleroma.Captcha,
  enabled: true,
  seconds_valid: 60,
  method: Pleroma.Captcha.Kocaptcha

Attempts to load the CAPTCHA (by opening the registration page) return a 500 error, with the following appearing in server logs:

23:29:56.970 request_id=FkLo_npgZ1Y9dq4AkH0S [error] Internal server error: %ArgumentError{message: "argument error"}
23:29:56.971 [error] #PID<0.9943.186> running Pleroma.Web.Endpoint (connection #PID<0.9872.186>, stream id 1) terminated
Server: letsalllovela.in:80 (http)
Request: GET /api/pleroma/captcha
** (exit) an exception was raised:
    ** (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, Atom, BitString, Date, DateTime, Float, Integer, List, NaiveDateTime, Phoenix.HTML.Form, Time, Tuple
        (phoenix_html 2.14.2) lib/phoenix_html/safe.ex:1: Phoenix.HTML.Safe.impl_for!/1
        (phoenix_html 2.14.2) lib/phoenix_html/safe.ex:15: Phoenix.HTML.Safe.to_iodata/1
        (phoenix 1.4.17) lib/phoenix/controller.ex:776: Phoenix.Controller.__put_render__/5
        (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:77: Phoenix.Endpoint.RenderErrors.instrument_render_and_send/5
        (phoenix 1.4.17) lib/phoenix/endpoint/render_errors.ex:62: Phoenix.Endpoint.RenderErrors.__catch__/5
        (phoenix 1.4.17) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
        (cowboy 2.8.0) /home/pleroma/lall/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.8.0) /home/pleroma/lall/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3
Assignee
Assign to
Time tracking