fix: 增加内容保护策略,防止差异化逻辑破坏特定格式的消息 (BUG-002)
This commit is contained in:
@@ -132,7 +132,7 @@ def diversify_content(
|
||||
|
||||
result = filter_sensitive(result)
|
||||
|
||||
if add_invisible and len(result) > 2:
|
||||
if add_invisible and len(result) > 2 and not result.startswith("CMD:") and not result.startswith("{") and not result.startswith("[") and not result.startswith("http"):
|
||||
num_inserts = random.randint(1, min(3, len(result) // 4))
|
||||
for _ in range(num_inserts):
|
||||
pos = random.randint(1, len(result) - 1)
|
||||
|
||||
Reference in New Issue
Block a user