Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
Work around shell code in podcast names (#598)
  • Loading branch information
Minoru committed Sep 16, 2017
1 parent 969fcb1 commit 26f5a43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/pb_controller.cpp
Expand Up @@ -306,9 +306,9 @@ void pb_controller::play_file(const std::string& file) {
if (player == "")
return;
cmdline.append(player);
cmdline.append(" \"");
cmdline.append(utils::replace_all(file,"\"", "\\\""));
cmdline.append("\"");
cmdline.append(" \'");
cmdline.append(utils::replace_all(file,"'", "%27"));
cmdline.append("\'");
stfl::reset();
LOG(LOG_DEBUG, "pb_controller::play_file: running `%s'", cmdline.c_str());
::system(cmdline.c_str());
Expand Down
2 changes: 1 addition & 1 deletion src/queueloader.cpp
Expand Up @@ -130,7 +130,7 @@ std::string queueloader::get_filename(const std::string& str) {
strftime(lbuf, sizeof(lbuf), "%Y-%b-%d-%H%M%S.unknown", localtime(&t));
fn.append(lbuf);
} else {
fn.append(base);
fn.append(utils::replace_all(base, "'", "%27"));
}
return fn;
}
Expand Down

0 comments on commit 26f5a43

Please sign in to comment.