sanitize load_text() path

This commit is contained in:
The-EDev 2022-02-08 19:14:55 +03:00
parent 155cf759eb
commit 6ad068494f
No known key found for this signature in database
GPG Key ID: 51C45DC0C413DCD9

View File

@ -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)