forgejo/routers/api
Gusted e8ebb5d6e3 fix: do not allow SSH url for migration (#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.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7004
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-21 07:57:06 +00:00
..
actions Move some Actions related functions from routers to services (#33280) 2025-01-19 11:52:09 +01:00
forgejo/v1 Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
packages Alt Linux Apt-Rpm repository support for Forgejo packages. (#6351) 2025-01-22 14:01:49 +00:00
shared Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
v1 fix: do not allow SSH url for migration (#7004) 2025-02-21 07:57:06 +00:00