mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
b86ab71836
The workspace guard's absolutePathPattern regex matches /Beijing?T in commands like 'curl wttr.in/Beijing'. Since 'wttr.in' is not a recognized web scheme, the path was routed through workspace sandbox validation, which could block legitimate scheme-less URL usage (curl allows bare domains without http://). Add detection for domain-like tokens preceding /path matches: - looksLikeDomain: checks for dot-separated tokens that don't end with common file extensions (.py, .go, .exe, etc.) - localPathExists: verifies the token does not exist as a local filesystem entry This dual guard prevents the symlink bypass identified in PR #2965 review: if 'foo.bar' exists as a local symlink or directory, the path still undergoes full workspace validation. Fixes #1042.