Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Normalize empty values for global settings #10823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bernardodemarco opened this issue May 6, 2025 · 1 comment
Open

Normalize empty values for global settings #10823

bernardodemarco opened this issue May 6, 2025 · 1 comment

Comments

@bernardodemarco
Copy link
Collaborator

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.

Copy link

boring-cyborg bot commented May 6, 2025

Thanks for opening your first issue here! Be sure to follow the issue template!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants