Skip to content

Commit

Permalink
Disallow filenames with trailing periods
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 committed Oct 5, 2017
1 parent 02907eb commit b3f8a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/addon/validation.cpp
Expand Up @@ -59,7 +59,7 @@ bool addon_name_legal(const std::string& name)

bool addon_filename_legal(const std::string& name)
{
if(name.empty() || name == "." ||
if(name.empty() || name.back() == '.' ||
name.find_first_of("/:\\~ \r\n\v\t") != std::string::npos ||
name.find("..") != std::string::npos) {
return false;
Expand Down

0 comments on commit b3f8a5a

Please sign in to comment.