Invites and new account creations return 409 status code
Environment
- Installation type (OTP or From Source): From source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE):
- Elixir version (
elixir -v
for from source installations, N/A for OTP): 2.4.51-430-g0b686c6e-develop - Operating system: Debian Buster
- PostgreSQL version (
psql -V
): 11.12
Issue description
Hello all. The other day, I sent someone an invite code for my instance; however, registering an account did not work for them, returning a 409 status code. As a result I decided to manually make an account for them, but this didn't work either, returning the same status code. These imply that this username (or that particular email address) has already been used; however, neither could be found in the database. I did end up managing to create a test account with an unused email address of my own, however when that particular user used different credentials, the error returned. There were no invite code conflicts, for the record, or at least there shouldn't be because I did not try to reuse any one-off code.
I've just reproduced the same error for documentation reasons. I think this part of the logs is probably relevant:
Logs
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.874 [info] POST /api/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.877 request_id=FuNUTZ1b580KmyQACwxR [debug] POST /api/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.877 request_id=FuNUTZ1b580KmyQACwxR [debug] Processing with Pleroma.Web.Fallback.LegacyPleromaApiRerouterPlug
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Parameters: %{"path" => ["pleroma", "admin", "users"], "users" => [%{"email" => "<user's email>", "nickname" => "<username>", "password" => "[FILTERED]"}]}
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Pipelines: []
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.877 request_id=FuNUTZ1b580KmyQACwxR [info] POST api/v1/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.880 request_id=FuNUTZ2NpiAKmyQACwxh [debug] POST api/v1/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.880 request_id=FuNUTZ2NpiAKmyQACwxh [debug] Processing with Pleroma.Web.AdminAPI.UserController.create/2
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Parameters: %{"path" => ["pleroma", "admin", "users"], "users" => [%{"email" => "<user's email>", "nickname" => "<username>", "password" => "[FILTERED]"}]}
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Pipelines: [:admin_api, :require_admin]
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.883 request_id=FuNUTZ2NpiAKmyQACwxh [debug] QUERY OK source="oauth_tokens" db=2.1ms queue=0.4ms idle=633.2ms
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: SELECT o0."id", o0."token", o0."refresh_token", o0."scopes", o0."valid_until", o0."user_id", o0."app_id", o0."inserted_at", o0."updated_at", u1."id", u1."bio", u1."raw_bio", u1."email", u1."name", u1."nickname", u1."password_hash", u1."keys", u1."public_key", u1."ap_id", u1."avatar", u1."local", u1."follower_address", u1."following_address", u1."featured_address", u1."tags", u1."last_refreshed_at", u1."last_digest_emailed_at", u1."banner", u1."background", u1."note_count", u1."follower_count", u1."following_count", u1."is_locked", u1."is_confirmed", u1."password_reset_pending", u1."is_approved", u1."registration_reason", u1."confirmation_token", u1."default_scope", u1."domain_blocks", u1."is_active", u1."no_rich_text", u1."ap_enabled", u1."is_moderator", u1."is_admin", u1."show_role", u1."uri", u1."hide_followers_count", u1."hide_follows_count", u1."hide_followers", u1."hide_follows", u1."hide_favorites", u1."email_notifications", u1."mascot", u1."emoji", u1."pleroma_settings_store", u1."fields", u1."raw_fields", u1."is_discoverable", u1."invisible", u1."allow_following_move", u1."skip_thread_containment", u1."actor_type", u1."also_known_as", u1."inbox", u1."shared_inbox", u1."accepts_chat_messages", u1."last_active_at", u1."disclose_client", u1."pinned_objects", u1."is_suggested", u1."last_status_at", u1."birthday", u1."show_birthday", u1."notification_settings", u1."blocks", u1."mutes", u1."muted_reblogs", u1."muted_notifications", u1."subscribers", u1."multi_factor_authentication_settings", u1."inserted_at", u1."updated_at" FROM "oauth_tokens" AS o0 INNER JOIN "users" AS u1 ON u1."id" = o0."user_id" WHERE (o0."token" = $1) ["<NOPE>"]
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.885 request_id=FuNUTZ2NpiAKmyQACwxh [debug] Sent 409 in 5ms
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.885 request_id=FuNUTZ2NpiAKmyQACwxh [info] Sent 409 in 7ms
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.885 request_id=FuNUTZ2NpiAKmyQACwxh [debug] Sent 409 in 8ms
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.885 request_id=FuNUTZ2NpiAKmyQACwxh [info] Sent 409 in 11ms
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.991 [info] GET /api/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.994 request_id=FuNUTaRcMy25FEIACwxx [debug] GET /api/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.994 request_id=FuNUTaRcMy25FEIACwxx [debug] Processing with Pleroma.Web.Fallback.LegacyPleromaApiRerouterPlug
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Parameters: %{"filters" => "local", "page" => "1", "path" => ["pleroma", "admin", "users"]}
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Pipelines: []
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.994 request_id=FuNUTaRcMy25FEIACwxx [info] GET api/v1/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.998 request_id=FuNUTaSWIRe5FEIACwyB [debug] GET api/v1/pleroma/admin/users
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: 14:16:20.998 request_id=FuNUTaSWIRe5FEIACwyB [debug] Processing with Pleroma.Web.AdminAPI.UserController.index/2
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Parameters: %{"filters" => "local", "page" => "1", "path" => ["pleroma", "admin", "users"]}
Apr 6 14:16:20 lotte-debian-pleroma mix[18849]: Pipelines: [:admin_api]
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: 14:16:21.003 request_id=FuNUTaSWIRe5FEIACwyB [debug] QUERY OK source="oauth_tokens" db=3.0ms queue=0.7ms idle=740.1ms
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: SELECT o0."id", o0."token", o0."refresh_token", o0."scopes", o0."valid_until", o0."user_id", o0."app_id", o0."inserted_at", o0."updated_at", u1."id", u1."bio", u1."raw_bio", u1."email", u1."name", u1."nickname", u1."password_hash", u1."keys", u1."public_key", u1."ap_id", u1."avatar", u1."local", u1."follower_address", u1."following_address", u1."featured_address", u1."tags", u1."last_refreshed_at", u1."last_digest_emailed_at", u1."banner", u1."background", u1."note_count", u1."follower_count", u1."following_count", u1."is_locked", u1."is_confirmed", u1."password_reset_pending", u1."is_approved", u1."registration_reason", u1."confirmation_token", u1."default_scope", u1."domain_blocks", u1."is_active", u1."no_rich_text", u1."ap_enabled", u1."is_moderator", u1."is_admin", u1."show_role", u1."uri", u1."hide_followers_count", u1."hide_follows_count", u1."hide_followers", u1."hide_follows", u1."hide_favorites", u1."email_notifications", u1."mascot", u1."emoji", u1."pleroma_settings_store", u1."fields", u1."raw_fields", u1."is_discoverable", u1."invisible", u1."allow_following_move", u1."skip_thread_containment", u1."actor_type", u1."also_known_as", u1."inbox", u1."shared_inbox", u1."accepts_chat_messages", u1."last_active_at", u1."disclose_client", u1."pinned_objects", u1."is_suggested", u1."last_status_at", u1."birthday", u1."show_birthday", u1."notification_settings", u1."blocks", u1."mutes", u1."muted_reblogs", u1."muted_notifications", u1."subscribers", u1."multi_factor_authentication_settings", u1."inserted_at", u1."updated_at" FROM "oauth_tokens" AS o0 INNER JOIN "users" AS u1 ON u1."id" = o0."user_id" WHERE (o0."token" = $1) ["<NOPE>"]
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: 14:16:21.006 request_id=FuNUTaSWIRe5FEIACwyB [debug] QUERY OK source="users" db=1.4ms queue=0.1ms idle=742.7ms
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: SELECT count(u0."id") FROM "users" AS u0 WHERE (NOT (u0."nickname" IS NULL)) AND (NOT (u0."nickname" LIKE 'internal.%')) AND (u0."invisible" = $1) AND (u0."local" = $2) [false, true]
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: 14:16:21.014 request_id=FuNUTaSWIRe5FEIACwyB [debug] QUERY OK source="users" db=7.4ms idle=739.6ms
Apr 6 14:16:21 lotte-debian-pleroma mix[18849]: SELECT u0."id", u0."bio", u0."raw_bio", u0."email", u0."name", u0."nickname", u0."password_hash", u0."keys", u0."public_key", u0."ap_id", u0."avatar", u0."local", u0."follower_address", u0."following_address", u0."featured_address", u0."tags", u0."last_refreshed_at", u0."last_digest_emailed_at", u0."banner", u0."background", u0."note_count", u0."follower_count", u0."following_count", u0."is_locked", u0."is_confirmed", u0."password_reset_pending", u0."is_approved", u0."registration_reason", u0."confirmation_token", u0."default_scope", u0."domain_blocks", u0."is_active", u0."no_rich_text", u0."ap_enabled", u0."is_moderator", u0."is_admin", u0."show_role", u0."uri", u0."hide_followers_count", u0."hide_follows_count", u0."hide_followers", u0."hide_follows", u0."hide_favorites", u0."email_notifications", u0."mascot", u0."emoji", u0."pleroma_settings_store", u0."fields", u0."raw_fields", u0."is_discoverable", u0."invisible", u0."allow_following_move", u0."skip_thread_containment", u0."actor_type", u0."also_known_as", u0."inbox", u0."shared_inbox", u0."accepts_chat_messages", u0."last_active_at", u0."disclose_client", u0."pinned_objects", u0."is_suggested", u0."last_status_at", u0."birthday", u0."show_birthday", u0."notification_settings", u0."blocks", u0."mutes", u0."muted_reblogs", u0."muted_notifications", u0."subscribers", u0."multi_factor_authentication_settings", u0."inserted_at", u0."updated_at" FROM "users" AS u0 WHERE (NOT (u0."nickname" IS NULL)) AND (NOT (u0."nickname" LIKE 'internal.%')) AND (u0."invisible" = $1) AND (u0."local" = $2) ORDER BY u0."id" DESC LIMIT $3 OFFSET $4 [false, true, 50, 0]
Is there perhaps an incorrect setting somewhere? Or does somehow somewhere this user already exist in the database? I have no clue. I'm willing to provide additional information if necessary.