forgejo/services/migrations
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
..
testdata feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
codebase.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
codebase_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
common.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
dump.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
error.go Update module github.com/google/go-github/v63 to v64 2024-08-24 16:05:36 +00:00
forgejo_downloader.go [BRANDING] add Forgejo Git Service and migration UI 2024-02-05 16:05:02 +01:00
forgejo_downloader_test.go [BRANDING] add Forgejo Git Service and migration UI 2024-02-05 16:05:02 +01:00
git.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
gitbucket.go Change the default maxPerPage for gitbucket (#30392) 2024-04-15 20:01:36 +02:00
gitea_downloader.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
gitea_downloader_test.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
gitea_uploader.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
gitea_uploader_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
github.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
github_test.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
gitlab.go chore(deps): Update gitlab api to updated library (#6487) 2025-01-07 19:06:33 +00:00
gitlab_test.go chore(deps): Update gitlab api to updated library (#6487) 2025-01-07 19:06:33 +00:00
gogs.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
gogs_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
http_client.go Support allowed hosts for migrations to work with proxy (#32025) 2024-09-14 17:52:54 +02:00
main_test.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
migrate.go fix: do not allow SSH url for migration (#7004) 2025-02-21 07:57:06 +00:00
migrate_test.go fix: do not allow SSH url for migration (#7004) 2025-02-21 07:57:06 +00:00
onedev.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
onedev_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
restore.go feat: implement migration of website field from gogs/gitea/github (#6474) 2025-01-20 12:18:19 +00:00
update.go Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00