Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#14,221 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
api, backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Java
Estrellas
3.1k
Forks
1.4k
Merge medio
6 d 20 h
PR fusionados (30 d)
27

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/cloudstack

Todos los issues de apache/cloudstack

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.