Skip to content

Attachment size limit in app.ini not enforced for REST API uploads #35512

@SmartVDS

Description

@SmartVDS

Description

When using the REST API to upload attachments (e.g. to Pull Requests), the configured file size limits in app.ini are not enforced and the attachments > 1 MB are being uploaded. The same limits are enforced correctly in the web UI.

Configuration snippet

[attachment]
| MAX_SIZE = 1

Gitea Version

1.24.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.49.1

Operating System

No response

How are you running Gitea?

We are self-hosting Gitea using Docker (official gitea/gitea image) in ubuntu 22.04 linux server.

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions