mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-07 09:12:57 +02:00
fix(bridge): Quote command arguments to preserve spaces in messages
Users reported messages with spaces were truncated to first word. Root cause: ' '.join(args) didn't quote arguments with spaces. Changes: - Import shlex module - Use shlex.quote() for each argument in execute_command() - Example: ['public', 'To jest test'] → "public 'To jest test'" This ensures meshcli receives multi-word messages correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import time
|
||||
import json
|
||||
import queue
|
||||
import uuid
|
||||
import shlex
|
||||
from pathlib import Path
|
||||
from flask import Flask, request, jsonify
|
||||
|
||||
@@ -325,7 +326,8 @@ class MeshCLISession:
|
||||
Dict with success, stdout, stderr, returncode
|
||||
"""
|
||||
cmd_id = str(uuid.uuid4())[:8]
|
||||
command = ' '.join(args)
|
||||
# Properly quote arguments containing spaces/special chars
|
||||
command = ' '.join(shlex.quote(arg) for arg in args)
|
||||
event = threading.Event()
|
||||
response_dict = {
|
||||
"event": event,
|
||||
|
||||
Reference in New Issue
Block a user