Skip to main content

validate_webhook_path

Function validate_webhook_path 

Source
pub fn validate_webhook_path(path: &str) -> Result<(), WebhookError>
Expand description

Validate a webhook path.

Rules:

  • Must be non-empty
  • Must not start or end with ‘/’
  • Must contain only alphanumeric characters, hyphens, underscores, dots, and slashes
  • Must not contain ‘..’ (directory traversal)
  • Maximum length: 256 characters