Files
Gitea/options
fff18237d5 fix(repo): do not reuse pull mirror credentials for a new host (#39991) (#40373)
Backport https://github.com/go-gitea/gitea/pull/39991

Changing a pull mirror address with an empty password field carried the
stored credentials over to the new address. The password is write-only,
so a repo admin who did not set up the mirror could send the owner's
token to a host they control, or pull another repository on the same
host that the token can read.

Stored credentials are now reused only when the address is unchanged,
like a changed username already drops the stored password. The API
cannot change the address and push mirrors never reuse credentials, so
both are unaffected.

Co-authored-by: Basavaraj S m <basavaraj@digiscrypt.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-11-15 05:04:55 +00:00
..