Skip to content

Commit

Permalink
sanitize load_text() path
Browse files Browse the repository at this point in the history
  • Loading branch information
The-EDev committed Feb 8, 2022
1 parent 155cf75 commit 6ad0684
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/crow/mustache.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ namespace crow

inline std::string load_text(const std::string& filename)
{
return detail::get_loader_ref()(filename);
std::string filename_sanitized(filename);
utility::sanitize_filename(filename_sanitized);
return detail::get_loader_ref()(filename_sanitized);
}

inline template_t load(const std::string& filename)
Expand Down

0 comments on commit 6ad0684

Please sign in to comment.