feat: nightly hardening - remote content-type validation - #8
Open
mouse-value-add wants to merge 1 commit into
Open
feat: nightly hardening - remote content-type validation#8mouse-value-add wants to merge 1 commit into
mouse-value-add wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
accepted any successful HTTPS response body type. That allowed non-markdown content types (for example or other binary/media responses) to flow into parsing, which wastes parse budget and weakens input hygiene for remote profile loading.
Approach
Allow only markdown/text profile media types:
Verification
RUN v2.1.9 /Users/mouse/.openclaw/workspace/repos/you.md
✓ test/parser/loadFromUrl.test.ts (5 tests) 9ms
Test Files 1 passed (1)
Tests 5 passed (5)
Start at 15:08:55
Duration 240ms (transform 34ms, setup 0ms, collect 38ms, tests 9ms, environment 0ms, prepare 26ms)
RUN v2.1.9 /Users/mouse/.openclaw/workspace/repos/you.md
✓ test/parser/frontmatter.test.ts (7 tests) 1ms
✓ test/parser/markdown.test.ts (11 tests) 3ms
✓ test/parser/yaml.test.ts (12 tests) 3ms
✓ test/parser/timeout.test.ts (3 tests) 2ms
✓ test/parser/loadFromUrl.test.ts (5 tests) 10ms
Test Files 5 passed (5)
Tests 38 passed (38)
Start at 15:08:55
Duration 264ms (transform 95ms, setup 0ms, collect 179ms, tests 19ms, environment 0ms, prepare 166ms)
Risks
Rollback Plan
Date: Fri Apr 17 15:08:56 2026 -0700
2 files changed, 78 deletions(-)