fix(mcp): emit portable Unicode NUL patterns (#1230)
Preserve NUL rejection while avoiding the short escape rejected by strict schema consumers. Guard the entire advertised input/output catalog and all three JavaScript regexp modes. Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
@@ -5,7 +5,7 @@ import { z } from "zod";
|
||||
export const localPathStringSchema = z
|
||||
.string()
|
||||
.min(1)
|
||||
.regex(/^[^\0]*$/u, "Local filesystem paths cannot contain NUL");
|
||||
.regex(/^[^\u0000]*$/u, "Local filesystem paths cannot contain NUL");
|
||||
|
||||
/** True when the value is an absolute filesystem path on the host platform. */
|
||||
export const isAbsoluteLocalPath = (value: string): boolean =>
|
||||
|
||||
Reference in New Issue
Block a user