mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-25 12:39:40 +02:00
See #8222 for context. This PR removes a call to `Blob.GetBlobContent` and `Blob.DataAsync` and unifies symlink resolution: - length was unlimited in one case - length was truncated to 1024 chars in the other case Now it is hard-limited to 4096 chars (ie error if larger), which is a length which seems appropriate according to https://stackoverflow.com/a/22575737. ### Tests - Tests are already present in `tests/integration/repo_test.go:972`: `TestRepoFollowSymlink` (it caught a cap/len stupid mistake). - [x] I did not document these changes and I do not expect someone else to do it. - [x] I do not want this change to show in the release notes. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8323 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: oliverpool <git@olivier.pfad.fr> Co-committed-by: oliverpool <git@olivier.pfad.fr> |
||
---|---|---|
.. | ||
cherry_pick.go | ||
commit.go | ||
content.go | ||
content_test.go | ||
diff.go | ||
diff_test.go | ||
file.go | ||
file_test.go | ||
patch.go | ||
temp_repo.go | ||
temp_repo_test.go | ||
tree.go | ||
tree_test.go | ||
update.go | ||
upload.go |