diff --git a/apps/terminal/serializers/storage.py b/apps/terminal/serializers/storage.py index 24d619540..7cc0628ba 100644 --- a/apps/terminal/serializers/storage.py +++ b/apps/terminal/serializers/storage.py @@ -157,7 +157,7 @@ def command_storage_es_host_format_validator(host): raise serializers.ValidationError(default_error_msg) if ':' not in h.netloc: raise serializers.ValidationError(default_error_msg) - _host, _port = h.netloc.split(':') + _host, _port = h.netloc.rsplit(':', maxsplit=1) if not _host: error_msg = _('Host invalid') raise serializers.ValidationError(error_msg)