Skip to content

fix: avoid utf8 panic in web fetch truncation#276

Open
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/web-fetch-utf8-truncation
Open

fix: avoid utf8 panic in web fetch truncation#276
Bortlesboat wants to merge 1 commit into
CortexLM:mainfrom
Bortlesboat:fix/web-fetch-utf8-truncation

Conversation

@Bortlesboat
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53271.\n\nWhat changed:\n- Replaced byte-index truncation in app-server web fetch output with character-based truncation.\n- Added a regression test that places a multi-byte character across the old 100,000-byte boundary.\n\nVerification:\n- cargo test -p cortex-app-server truncates_fetch_output_on_utf8_boundary_without_panic -- --nocapture\n- cargo test -p cortex-app-server --lib -- --skip tools::shell::tests::test_execute_shell\n- cargo check -p cortex-app-server\n- cargo fmt --check --package cortex-app-server\n- git diff --check\n\nNote: the skipped app-server lib test is the existing Windows-only shell test that expects echo as an executable.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant