M auth/web.go => auth/web.go +2 -1
@@ 170,8 170,9 @@ func handlerTelegramLogin(w http.ResponseWriter, rq *http.Request) {
false,
)
)
+ // If registering a user via Telegram failed, because a Telegram user with this name
+ // has already registered, then everything is actually ok!
if user.HasUsername(username) && user.ByName(username).Source == "telegram" {
- // Problems is something we put blankets on.
err = nil
}
M user/net.go => user/net.go +1 -1
@@ 59,7 59,7 @@ func Register(username, password, group, source string, force bool) error {
return fmt.Errorf("username ā%sā is already taken", username)
case !force && cfg.RegistrationLimit > 0 && Count() >= cfg.RegistrationLimit:
return fmt.Errorf("reached the limit of registered users (%d)", cfg.RegistrationLimit)
- case password == "":
+ case password == "" && source != "telegram":
return fmt.Errorf("password must not be empty")
}