Skip to content

Normalize empty values for global settings #10823

Open
@bernardodemarco

Description

@bernardodemarco

Currently, a considerable amount of global settings have empty strings as their default values. Therefore, when the resetConfiguration API is executed for these configurations, the value is restored to an empty string (default value), as expected.

However, another way to reset configuration values is by executing the updateConfiguration API, specifying the value parameter to an empty string. The current behavior of the API workflow is to update the configuration value to NULL in the database. To avoid bugs down the line in these scenarios, such as eventual NPEs, the API workflow should be modified to consider the configuration's default value.

Therefore, for instance, when executing the following API call:

> update configuration name="backup.plugin.veeam.password" value=""

The backup.plugin.veeam.password configuration value should be changed to an empty string in the database, because its default value is not NULL.

Accordingly, for settings such as api.allowed.source.cidr.list, which has "0.0.0.0/0,::/0" as default value, when executing the following API call:

> update configuration name="api.allowed.source.cidr.list" value=""

The setting's value stored in the database should be an empty string, and not NULL.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions