Skip to content

Commit 77c4b9c

Browse files
authored
fix: strip whitespace and handle null values in instance configuration (#8744)
When patching instance configuration values, the raw values from request.data were used directly without sanitization. This adds: - Whitespace stripping via str().strip() to prevent leading/trailing spaces from being stored - Explicit None handling so that null values become empty strings instead of the literal string "None"
1 parent 8a2579c commit 77c4b9c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/api/plane/license/api/views/configuration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def patch(self, request):
4545

4646
bulk_configurations = []
4747
for configuration in configurations:
48-
value = request.data.get(configuration.key, configuration.value)
48+
raw_value = request.data.get(configuration.key, configuration.value)
49+
value = "" if raw_value is None else str(raw_value).strip()
4950
if configuration.is_encrypted:
5051
configuration.value = encrypt_data(value)
5152
else:

0 commit comments

Comments
 (0)