Generic package size limited to 32MiB #9418

Closed
opened 2025-11-02 08:38:10 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wtodd1 on GitHub (Aug 17, 2022).

Description

If you try to upload a package that is larger than 32MiB to the generic package registry, the upload appears to succeed, and the package can be seen in the web ui, but downloading the package later gives a 0 byte file.

I suspect this is due to the hard-coded buffer size on this line.

Looking at references to CreateHashedBufferFromReader, the 32MiB limit also seems to apply to the other package registries as well.

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

I did not receive the confirmation email after registering, so I was unable to attempt it.

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Reproduced on docker and Windows 10.

Database

SQLite

Originally created by @wtodd1 on GitHub (Aug 17, 2022). ### Description If you try to upload a package that is larger than 32MiB to the generic package registry, the upload appears to succeed, and the package can be seen in the web ui, but downloading the package later gives a 0 byte file. I suspect this is due to the hard-coded buffer size on [this line](https://github.com/go-gitea/gitea/blob/7503cd35c285741c6d9caf9797a5c953ae9dccf6/routers/api/packages/generic/generic.go#L85). Looking at references to CreateHashedBufferFromReader, the 32MiB limit also seems to apply to the other package registries as well. ### Gitea Version 1.17.0 ### Can you reproduce the bug on the Gitea demo site? I did not receive the confirmation email after registering, so I was unable to attempt it. ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Reproduced on docker and Windows 10. ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:38:10 -06:00
Author
Owner

@lunny commented on GitHub (Aug 18, 2022):

This has been fixed by #20635

@lunny commented on GitHub (Aug 18, 2022): This has been fixed by #20635
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9418