Description
Description
If I add an SMTP auth source to an install of Gitea v1.15.11, I can register new accounts by logging in against that source.
If I do the same in Gitea v1.16.5, new accounts will not register, and I get a Username or password is incorrect.
error. This is true whether I use a fresh install, or if I migrate the above instance to v1.16.
Even though I can't register a new account, if I add the user manually I can then login with SMTP auth. This implies the SMTP connection is set up correctly.
I am doing all this as part of an evaluation exercise, so these are all fresh, clean Gitea installs.
I get the following in the logs:
2022/03/29 09:10:19 Completed GET /user/login?redirect_to=%2f 200 OK in 10.7847ms
2022/03/29 09:10:19 Started GET /assets/img/logo.svg for 127.0.0.1:54610
2022/03/29 09:10:19 Completed GET /assets/img/logo.svg 200 OK in 949.5µs
2022/03/29 09:10:32 Started POST /user/login for 127.0.0.1:54612
2022/03/29 09:10:32 ...ers/web/auth/auth.go:200:SignInPost() [I] Failed authentication attempt for [email protected] from 127.0.0.1:54612: Email address does not exist [email: [email protected]]
2022/03/29 09:10:32 Completed POST /user/login 200 OK in 5.5843ms
My research suggests that this relates to issue #16612, where the SMTP was overhauled between the two versions.
Reproduction:
v1.15.11 working
- Create a new instance of Gitea v1.15.11 running locally
- Change the DB type to SQLite and approve the initial setup
- Create an admin account and log in
- Add an authentication source, SMTP, "LOGIN", Enable TLS Encryption
- Log out, then try to log in with a valid account on the SMTP server
-
- This will succeed
v.1.16.5 not working
- Create a new instance of Gitea v1.16.5 running locally
- Change the DB type to SQLite and approve the initial setup
- Create an admin account and log in
- Add an authentication source, SMTP, "LOGIN"
- Log out, then try to log in with a valid account on the SMTP server
-
- This will fail
- Log back in as an admin, and add that SMTP account as a new user
- Log out,and attempt to log in the SMTP account again
-
- This will succeed
Gitea Version
v1.16.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Self hosted on both WSL Ubuntu 20 and Windows 11. Not running in a package.
Database
SQLite