Skip to content

Account linking does not work if only external registration is allowed #8589

Closed
@PKizzle

Description

@PKizzle
  • Gitea version (or commit ref): 1.9.4
  • Git version: 2.22.0
  • Operating system: GNU/Linux Debian 9
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (ALLOW_ONLY_EXTERNAL_REGISTRATION not set to true)
    • Not relevant
  • Log gist:

Description

The password input is disabled if only external registration is enabled.
However the form can not be successfully submitted because Gitea requires an input to the password text field.

The following code snippet states, that this is a feature for "second factor"-enabled accounts.

gitea/routers/user/auth.go

Lines 894 to 898 in 280f4be

// In models.User an empty password is classed as not set, so we set form.Password to empty.
// Eventually the database should be changed to indicate "Second Factor"-enabled accounts
// (accounts that do not introduce the security vulnerabilities of a password).
// If a user decides to circumvent second-factor security, and purposefully create a password,
// they can still do so using the "Recover Account" option.

However if the existing user has set a password already, the password field needs to be shown. Otherwise he is unable to authenticate and link the account.

Maybe there should be an additional setting specifically for "second factor"-enabled accounts instead of using ALLOW_ONLY_EXTERNAL_REGISTRATION?

Screenshots

2019-10-07t15-54-24

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions