Page MenuHomePhabricator

Discourse login broken
Closed, ResolvedPublicBUG REPORT

Description

Discourse was updated due to T294529: CVE-2021-41163 and discourse-mediawiki.wmflabs.org, which broke login:

ArgumentError (wrong number of arguments (given 2, expected 1))
lib/user_name_suggester.rb:7:in `suggest'
app/controllers/users/omniauth_callbacks_controller.rb:35:in `complete'
app/controllers/application_controller.rb:408:in `block in with_resolved_locale'
app/controllers/application_controller.rb:408:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:50:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:354:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'

Event Timeline

The error refers to user_name_suggester.rb line 7, which takes one argument, but the documentation mentions a second and discourse-wikimedia-auth indeed uses two, so probably a recent change.

Thank you for looking into this. I see the developer has responded already. We seem to be in an impasse, where either we... remove Wikimedia login and leave Discourse in pure read-only mode, or if someone has Discourse plans in mind, we talk to the developer to work on a fix. I'm sure there are other possibilities, but these two are logical.

As long as it's in read-only mode it doesn't really matter, login wouldn't work either way. I only encountered this because I took the site out of read-only mode to fix T296602: Space (Discourse) theme broken but couldn't log in as an admin (later I found out that I'm not an admin at all :) and that admins have an emergency login method via /u/admin-login which would work around this).

Anyway I think the fix is trivial, I just did not have the time to figure out how to apply it across all the containerization.

Tgr claimed this task.

This was fixed back then but I forgot to close the task.