Refs: https://codeberg.org/forgejo/forgejo/issues/1897 (cherry picked from commit ddc3c22558)
ddc3c22558