mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-16 10:21:06 +00:00
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>