Package burp.mcp.util
Class InputValidator
java.lang.Object
burp.mcp.util.InputValidator
Input validation for MCP tool parameters.
Validates URLs, file paths, cookie values, and custom data
against injection and format attacks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringvalidateCookieValue(String value, String paramName) Validates a cookie name or value: no CR/LF, max 4096 chars.static StringvalidateCustomData(String data, String paramName) Validates Collaborator custom data: max 16 alphanumeric chars.static StringvalidateFilePath(String path, String paramName) Validates a file path: no .. traversal, no null bytes.static StringvalidateUrl(String url, String paramName) Validates a URL: must start with http:// or https://, max 2048 chars, no null bytes, no CR/LF injection.
-
Method Details
-
validateUrl
Validates a URL: must start with http:// or https://, max 2048 chars, no null bytes, no CR/LF injection. Returns null if valid, or an error message. -
validateFilePath
Validates a file path: no .. traversal, no null bytes. Returns null if valid, or an error message. -
validateCookieValue
Validates a cookie name or value: no CR/LF, max 4096 chars. -
validateCustomData
Validates Collaborator custom data: max 16 alphanumeric chars.
-