From 79b7306c6464155f975d5b0e1c228354c475fbbe Mon Sep 17 00:00:00 2001 From: okxint Date: Mon, 16 Mar 2026 15:50:01 +0530 Subject: [PATCH] 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" --- apps/api/plane/license/api/views/configuration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/plane/license/api/views/configuration.py b/apps/api/plane/license/api/views/configuration.py index bb9a9e00ee6..c5ad5f5788b 100644 --- a/apps/api/plane/license/api/views/configuration.py +++ b/apps/api/plane/license/api/views/configuration.py @@ -45,7 +45,8 @@ def patch(self, request): bulk_configurations = [] for configuration in configurations: - value = request.data.get(configuration.key, configuration.value) + raw_value = request.data.get(configuration.key, configuration.value) + value = "" if raw_value is None else str(raw_value).strip() if configuration.is_encrypted: configuration.value = encrypt_data(value) else: