Skip to content

Commit 83640d8

Browse files
okxintclaude
andcommitted
fix: strip whitespace and handle null values in instance configuration
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" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6627282 commit 83640d8

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)