Commit graph ruby-sdk/test/mcp/string_utils_test.rb
Author SHA1 Message Date
Koichi ITO
248b4d2dad Fix ReDoS vulnerability in StringUtils#underscore
## Summary

Replace regex patterns with lookahead/lookbehind assertions to prevent
catastrophic backtracking on Ruby 3.1 and earlier.

This issue only affects Ruby 3.1 and earlier. Since it does not occur on Ruby 3.2+,
it is not an issue in the current stable release (0.4.0), which does not include #206.

## Regression Testing

Ensure the regex patterns complete within 1 second for a 50,000-character input
that would otherwise trigger superlinear backtracking.
2026-01-09 01:14:52 +09:00
Koichi ITO
f33fe309b4 Rename test directory from model_context_protocol to mcp
Follow-up to #24.

The directory structure of the product code and test code is expected to match.
2025-06-01 02:13:28 +09:00
Renamed from test/model_context_protocol/string_utils_test.rb (Previous history)