Skip to content

Conversation

peterhebert
Copy link
Owner

Remedies to avoid possible path traversal through the 'lens' and 'twig_template' shortcode parameters.

  • Trim '../' sequences off of supplied arguments
  • use sanitize_file_name() function to further sanitize the supplied template arguments, stripping out whitespace and unwanted characters.

Also add PHPDoc comments where missing, and split class into its own file.

@peterhebert peterhebert merged commit 6ab4943 into master Aug 22, 2025
@peterhebert peterhebert deleted the security/2025-08-path-traversal branch August 22, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant