Skip to content

Commit

Permalink
Further explain the filename character blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
AI0867 authored and GregoryLundberg committed Nov 30, 2017
1 parent 7823f22 commit daddedb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/addon/client.cpp
Expand Up @@ -156,7 +156,11 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
if(!check_names_legal(addon_data, &badnames)){
this->last_error_ =
vgettext("The add-on <i>$addon_title</i> has an invalid file or directory "
"name and cannot be published.", i18n_symbols);
"name and cannot be published. "

"File or directory names may not contain whitespace, control characters or any of the following characters: '&quot; * / : &lt; &gt; ? \\ | ~'. "
"It also may not contain '..' end with '.' or be longer than 255 characters."
, i18n_symbols);
this->last_error_data_ = font::escape_text(utils::join(badnames, "\n"));
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion src/campaign_server/campaign_server.cpp
Expand Up @@ -690,7 +690,8 @@ void server::handle_upload(const server::request& req)
LOG_CS << "Upload aborted - invalid file names in add-on data (" << badnames.size() << " entries).\n";
send_error(
"Add-on rejected: The add-on contains files or directories with illegal names. "
"File or directory names may not contain whitespace or any of the following characters: '/ \\ : ~'",
"File or directory names may not contain whitespace, control characters or any of the following characters: '\" * / : < > ? \\ | ~'. "
"It also may not contain '..' end with '.' or be longer than 255 characters.",
filelist, req.sock);
} else if(!check_case_insensitive_duplicates(data)) {
LOG_CS << "Upload aborted - case conflict in add-on data.\n";
Expand Down

0 comments on commit daddedb

Please sign in to comment.