1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-06-27 16:35:57 +00:00
forgejo/services
John Moon b2b039b6e7 fix: allow instance API URLs in release assets (#7644)
Currently, if you try to add an "external" link to a release in Forgejo,
the validation code checks for basic URL soundness and then specifically
checks that the URL is not an API URL.

In some cases, it may make sense to link to instance API URLs (like when
you want to create a release that links to several different repos'
packages). Relax this check so it only validates basic URL soundness.

Refs: https://codeberg.org/forgejo/forgejo/issues/7598

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

See: https://codeberg.org/forgejo/docs/pulls/1161

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7644): <!--number 7644 --><!--line 0 --><!--description YWxsb3cgaW5zdGFuY2UgQVBJIFVSTHMgaW4gcmVsZWFzZSBhc3NldHM=-->allow instance API URLs in release assets<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7644
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Malte Jürgens <maltejur@noreply.codeberg.org>
Co-authored-by: John Moon <john.moon@vts-i.com>
Co-committed-by: John Moon <john.moon@vts-i.com>
2025-06-09 10:01:59 +02:00
..
actions feat: auto cleanup of offline runners (#7803) 2025-06-08 00:13:37 +02:00
agit chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
asymkey feat: consider WebAuthn & SSH for instance signing (#7693) 2025-04-29 10:34:07 +00:00
attachment fix: allow instance API URLs in release assets (#7644) 2025-06-09 10:01:59 +02:00
auth chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
automerge chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
context fix: omit Content-Length on 307 redirects when serving direct manifest for containers (#8037) 2025-06-09 08:43:41 +02:00
contexttest Replace the 'relative-time' element scripting with custom, translatable rewrite (#6154) 2025-05-03 14:11:01 +00:00
convert fix: rename api.{List,}ActionRun to api.{List,}RepoActionRun (#8066) 2025-06-04 07:09:06 +02:00
cron feat: auto cleanup of offline runners (#7803) 2025-06-08 00:13:37 +02:00
doctor chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
externalaccount chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
f3 Update module code.forgejo.org/f3/gof3/v3 to v3.11.0 (forgejo) (#8056) 2025-06-03 14:24:57 +02:00
federation chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
feed Show if commit is signed in activity feed and unify sha box (#6933) 2025-05-03 10:54:52 +00:00
forgejo chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
forms Actions Failure, Succes, Recover Webhooks (#7508) 2025-06-03 14:29:19 +02:00
gitdiff chore: simplify GetDiff (#7682) 2025-04-27 19:49:59 +00:00
indexer chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
lfs chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
mailer chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
markup chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
migrations chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
mirror chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
notify better comments and variable names for ActionRunNowDone (#7697) 2025-04-28 06:37:08 +00:00
org chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
packages fix: maven use groupId:artifactId for package name concatenation (#6352) 2025-06-01 09:02:29 +02:00
pull [gitea] Always use an empty line to separate the commit message and trailer (#8041) 2025-06-02 22:10:59 +02:00
release chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
remote chore: tune down remote user promotion debug message shown as error (#7687) 2025-04-27 20:50:48 +00:00
repository fix: camel and pascal case transformer (#8034) 2025-06-01 17:06:25 +02:00
secrets chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
shared/automerge chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
task chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
uinotification chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user chore: QoL improvements to tests (#7917) 2025-05-21 15:45:56 +02:00
webhook Actions Failure, Succes, Recover Webhooks (#7508) 2025-06-03 14:29:19 +02:00
wiki chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00