Skip to content
Permalink
Browse files

Work around shell code in podcast names (#598)

  • Loading branch information...
Minoru committed Aug 27, 2017
1 parent 1bc93b8 commit c8fea2f60c18ed30bdd1bb6f798e994e51a58260
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/pb_controller.cpp
  2. +1 −1 src/queueloader.cpp
@@ -367,9 +367,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();
utils::run_interactively(cmdline, "pb_controller::play_file");
}
@@ -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;
}

0 comments on commit c8fea2f

Please sign in to comment.
You can’t perform that action at this time.