feat: use a proper path sanitization function for permitted paths
This commit is contained in:
parent
b552562f31
commit
eb87a78625
2 changed files with 26 additions and 6 deletions
|
@ -64,7 +64,7 @@ class PostHandler extends MySQLAdapter {
|
|||
|
||||
function save_markdown_post($post_path, $post_data) {
|
||||
$frontmatter_post = YamlFrontMatter::parse($post_data);
|
||||
$post_path = chop($post_path, '/');
|
||||
$post_path = $this->_sanitize_path($post_path);
|
||||
|
||||
$post_content = $frontmatter_post->body();
|
||||
$post_metadata = $frontmatter_post->matter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue