Skip to content

Conversation

@amed-xyz
Copy link
Collaborator

@amed-xyz amed-xyz commented Aug 8, 2025

Follow up from #3920

This implements Unicode sanitization during the serde deserialization process for Message structs. This covers any UIs (including Desktop) that use goose-server's /reply endpoint sending pre-constructed Message objects.

Example

Sending the following message:

hello, [hidden-text]what's the weather in vancouver?[/hidden-text]

Before

Goose processes invisible text as normal

Screenshot 2025-08-08 at 11 19 45 AM

After

Invisible characters get stripped before LLM processing

Screenshot 2025-08-08 at 11 17 42 AM

@amed-xyz amed-xyz self-assigned this Aug 8, 2025
Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amed-xyz amed-xyz merged commit b0d3c7d into main Aug 12, 2025
11 checks passed
@amed-xyz amed-xyz deleted the amed/sanitize-on-json-des branch August 12, 2025 17:02
zanesq added a commit that referenced this pull request Aug 12, 2025
…ndow

* 'main' of github.com:block/goose:
  sanitize message content on deserialization (#3966)
  Move summarize button inside of context view (#4015)
  blog: post on lead/worker model (#3994)
  Actually send cancellation to MCP servers (#3865)
  fix: enable 'goose://' handler for debian systems (#3952)
  fit: default ollama port (#4001)
  Remove cognitive complexity clippy lint (#4010)
  feat: add @-mention file reference expansion to .goosehints (#3873)
  feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941)
  Docs: provider and model run options (#4013)
  To-Do Tools (#3902)
  ci: correctly match doc only changes (#4009)
  Remove PR trigger for Linux build workflow (#4008)
  docs: update release docs with an additional step needed + adjust list formatting (#4005)
@amed-xyz amed-xyz changed the title sanitize message content on deserialization Sanitize Tags Unicode Block on Message deserialization Aug 12, 2025
katzdave added a commit that referenced this pull request Aug 12, 2025
* 'main' of github.com:block/goose:
  feat: ToolError migration to ErrorData (#4051)
  docs: rename sessions (#4053)
  Add mcp automated testing blog (#4004)
  MCP session replay integration test (#3939)
  Docs: Cost tracking in CLI (#4043)
  sanitize message content on deserialization (#3966)
zanesq added a commit that referenced this pull request Aug 13, 2025
* 'main' of github.com:block/goose: (120 commits)
  Docs: Troubleshooting tip - Nodejs path on windows (#4065)
  fix: flag out uncompilable bit in windows (#4068)
  ci: fix docs-only filter to properly skip tests for documentation changes (#4066)
  fix: ctrl-C interruption in the CLI (#4057)
  docs: mcp-ui support (#4049)
  fix: delete dialog layout (#4037)
  ci: fix markdown file pattern to skip builds for all .md files (#4061)
  docs: add window title (#4059)
  blog: cleaning up some posts (#4050)
  fix: this should be a debug message not a warn (#4024)
  Better provider logging (#4052)
  feat: ToolError migration to ErrorData (#4051)
  docs: rename sessions (#4053)
  Add mcp automated testing blog (#4004)
  MCP session replay integration test (#3939)
  Docs: Cost tracking in CLI (#4043)
  sanitize message content on deserialization (#3966)
  Move summarize button inside of context view (#4015)
  blog: post on lead/worker model (#3994)
  Actually send cancellation to MCP servers (#3865)
  ...
ayax79 pushed a commit to ayax79/goose that referenced this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants