mirror of
1
Fork 0
forgejo/routers
forgejo-backport-action 52fb476fb1 [v10.0/forgejo] fix: do not allow SSH url for migration (#7018)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/7004

- Add a new function `IsPushMirrorURLAllowed` that will allow `ssh://` url and make the existing `IsMigrateURLAllowed` not allow such URLs anymore.
- Resolves forgejo/forgejo#6960
- Existing integration tests make sure that SSH urls are still allowed for the push mirror feature and added unit test to ensure that `IsMigrateURLAllowed` no longer allows SSH urls.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7018
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-02-21 11:46:08 +00:00
..
api [v10.0/forgejo] fix: do not allow SSH url for migration (#7018) 2025-02-21 11:46:08 +00:00
common [v10.0/forgejo] fix: always set stripped slashes on http request (#6884) 2025-02-10 20:00:25 +00:00
install [CHORE] Move to new sessioner library 2024-08-25 03:47:08 +02:00
private [CHORE] Use forked `binding` library 2024-11-05 22:47:34 +01:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web [v10.0/forgejo] fix: do not allow SSH url for migration (#7018) 2025-02-21 11:46:08 +00:00
init.go Revert "Open telemetry integration (#3972)" 2024-08-07 11:22:43 +02:00