[bug]: Asset upload returns 500 when size is not a number, and accepts zero or negative sizes
Maintainer thường phản hồi trong vòng 1 ngày
@vihar đang làm issue này rồi.
Từ ngày 24/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
The upload endpoints read the size with int(request.data.get("size", ...)), so a request with "size": "abc" or "size": null fails with ValueError or TypeError and a 500. A size of 0 or -5 is accepted and passed on to the presigned upload.
The same line is in apps/api/plane/app/views/asset/v2.py (user, workspace and project assets), apps/api/plane/api/views/asset.py (three endpoints), apps/api/plane/app/views/issue/attachment.py and apps/api/plane/space/views/asset.py. The work item attachment endpoint of the public API (apps/api/plane/api/views/issue.py) already handles this and answers with a 400.
Steps to reproduce
POST /api/assets/v2/user-assets/with{"name": "a.png", "type": "image/png", "size": "abc", "entity_type": "USER_AVATAR"}.- The response is a 500 and the log shows
invalid literal for int() with base 10: 'abc'. - With
"size": -5the request succeeds with a 200 instead of a 400.
Environment
Production
Browser
None
Edition
Community
Version
v1.5.0 (also on preview at 723bb178f)
- Ngôn ngữ chính
- TypeScript
- Star
- 63k
- Fork
- 6.5k
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của makeplane/plane
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug]: Comment external_id is deduplicated per project instead of per work itemCó thể đã có người làm @MishraTanishq619 đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
makeplane/plane#10195 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing optional chaining on actor_details and reaction_items in apps/space reactions and votesCó thể đã có người làm @ghazy2001 đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
makeplane/plane#10111 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
makeplane/plane#10082 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của makeplane/plane
Issue tương tự
-
good first issue help wanted
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 86/100
Intelligenza-Umana/intelligenza-umana-web#16 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-webui/open-webui#35184 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
danielmiessler/LifeOS#3001 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày