forked from gitea/gitea

Backport #26198 by @CaiCandong As title Before:  After:  fix #26189 Co-authored-by: caicandong <50507092+CaiCandong@users.noreply.github.com>