From 86298b911fda23372823069f802a286173c40587 Mon Sep 17 00:00:00 2001 From: taylanbakircioglu Date: Fri, 7 Nov 2025 11:51:14 +0300 Subject: [PATCH] Hotfix: Fix list.strip() error in config parser validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 Critical Bug Fix: - Fixed 'list' object has no attribute 'strip' error - Error occurred in _validate_parsed_config() at line 847 - use_backend_rules is now a list, not a string 🔧 Technical Details: - Changed from: frontend.use_backend_rules.strip() - Changed to: bool(frontend.use_backend_rules) - Simple boolean check works for both list and None types ✅ Impact: - Bulk import parsing now works without errors - Config validation properly handles list-based use_backend_rules - All warning messages display correctly Error was: 'list' object has no attribute 'strip' at _validate_parsed_config line 847 Fix applied: Line 847-848: Use bool() instead of .strip() for list validation --- backend/utils/haproxy_config_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/utils/haproxy_config_parser.py b/backend/utils/haproxy_config_parser.py index 2efcc10..c4abaa8 100644 --- a/backend/utils/haproxy_config_parser.py +++ b/backend/utils/haproxy_config_parser.py @@ -844,7 +844,8 @@ class HAProxyConfigParser: # Check if frontend has any backend routing has_default_backend = frontend.default_backend is not None - has_use_backend_rules = frontend.use_backend_rules is not None and frontend.use_backend_rules.strip() + # CRITICAL FIX: use_backend_rules is now a list, not a string + has_use_backend_rules = bool(frontend.use_backend_rules) if not has_default_backend and not has_use_backend_rules: # Frontend has no routing - check if it has redirect rules