mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-03 20:26:36 +08:00
fix: harden bot accounts and download handling
This commit is contained in:
@@ -188,6 +188,17 @@ func TestAdminResetPasswordAllowsLoginWithNewPassword(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoginAcceptsUsernameCaseVariant(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
_, auth, _, _ := newAuthTestServices(t)
|
||||
if _, _, err := auth.Register(ctx, "viewer", "password"); err != nil {
|
||||
t.Fatalf("register: %v", err)
|
||||
}
|
||||
if _, err := auth.Login(ctx, "Viewer", "password"); err != nil {
|
||||
t.Fatalf("case variant username should login: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoginKeepsOnlyConfiguredActiveRefreshTokens(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
repos, auth, _, _ := newAuthTestServices(t)
|
||||
|
||||
Reference in New Issue
Block a user