Skip to content

fix: validate pattern filter types#445

Open
darrenhalden537-lang wants to merge 1 commit into
mrexodia:mainfrom
darrenhalden537-lang:fix/pattern-filter-type-validation
Open

fix: validate pattern filter types#445
darrenhalden537-lang wants to merge 1 commit into
mrexodia:mainfrom
darrenhalden537-lang:fix/pattern-filter-type-validation

Conversation

@darrenhalden537-lang

Copy link
Copy Markdown

Summary

  • validate pattern_filter input before string/glob/regex matching
  • return a clear IDAError for non-string filters instead of an AttributeError from .startswith
  • add focused unit coverage for non-string rejection plus existing string/glob/regex behavior

Context

This covers one of the low-risk pre-flight mitigations discussed in #235: malformed/non-string filter inputs should fail before entering pattern matching.

Tests

  • python -m py_compile src/ida_pro_mcp/ida_mcp/utils.py tests/test_utils_pattern_filter.py
  • uv run pytest tests/test_utils_pattern_filter.py tests/test_server_transport.py -q

Note: I also tried uv run pytest tests/test_utils_pattern_filter.py tests/test_worker_lifecycle.py tests/test_server_transport.py -q; the new filter tests passed, but two pre-existing worker lifecycle timing tests failed locally on the unmodified origin/main timing behavior.

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.

1 participant