Password complexity check with PASSWORD_COMPLEXITY = ["lower", "upper", "digit", "spec"] accepts a password with no special character #11740

Closed
opened 2025-11-02 09:46:21 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @kaidrumm on GitHub (Sep 27, 2023).

Description

I have Gitea on a LXC container (Turnkey Gitea).

Under [security] in app.ini, I have tried:
PASSWORD_COMPLEXITY = ["lower", "upper", "digit", "spec"]
or
PASSWORD_COMPLEXITY = [lower, upper, digit, spec]

However, a password that has no special character succeeds.
The tests in modules/auth/password/password_test.go do not include a test for all four character classes.

Gitea Version

Gitea version 1.18.3 built with GNU Make 4.1, go1.19.5 : bindata, sqlite, sqlite_unlock_notify

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?

I am running Turnkey Gitea in a LXC container.

Database

MySQL/MariaDB

Originally created by @kaidrumm on GitHub (Sep 27, 2023). ### Description I have Gitea on a LXC container (Turnkey Gitea). Under [security] in app.ini, I have tried: PASSWORD_COMPLEXITY = ["lower", "upper", "digit", "spec"] or PASSWORD_COMPLEXITY = [lower, upper, digit, spec] However, a password that has no special character succeeds. The tests in modules/auth/password/password_test.go do not include a test for all four character classes. ### Gitea Version Gitea version 1.18.3 built with GNU Make 4.1, go1.19.5 : bindata, sqlite, sqlite_unlock_notify ### 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? I am running Turnkey Gitea in a LXC container. ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 09:46:21 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Sep 28, 2023):

PASSWORD_COMPLEXITY=lower,upper,digit,spec

@wxiaoguang commented on GitHub (Sep 28, 2023): PASSWORD_COMPLEXITY=lower,upper,digit,spec
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11740