Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

the inputs for capacity bytes in edit option of storage pool are not validated to be positive

Đang mở
#14,221 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
api, backend

Hướng nghiên cứu

Start at the updateStoragePool API entry point and trace validation for the capacity bytes parameter. Reproduce the request with zero and negative values, then verify that both are rejected immediately with a clear Invalid parameter error rather than reaching backend processing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
problem

The updateStoragePool API currently accepts zero or negative values for capacity-related parameters. Add positive-number validation so invalid values are rejected with Invalid parameter error. This prevents invalid storage pool capacity settings from reaching backend processing.

versions

The versions of ACS, hypervisors, storage, network etc..

Checked on 4.23

The steps to reproduce the bug
  1. Click on edit option for storage pool
  2. Input a negative number for capacity bytes
    3.click on OK to edit it.

you see an error as : Unable to update on DB, due to: Data truncation: Out of range value for column 'capacity_bytes' at row 1

instead of throwing an error for invalid parameter.
...

What to do about it?

Before this fix : When I tried to update a default primary storage pool using a negative value

Image

when I tried to input 0 as capacity bytes for storage pool: It is updating it to 0

Image

Add positive-number validation to the capacity bytes parameter in the updateStoragePool API. If a user provides zero or a negative value, reject the request immediately with a clear invalid-parameter error instead of sending it for backend processing.

After the fix:

Image Image
Ngôn ngữ chính
Java
Star
3.1k
Fork
1.4k
Merge trung bình
6 ngày 20 giờ
Pull request đã merge (30 ngày)
27

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/cloudstack

Tất cả issue của apache/cloudstack

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.