Skip to content

Commit

Permalink
Remote ISO: Don't expose HTTP paths from recent for "re-sharing", won…
Browse files Browse the repository at this point in the history
…'t work.
  • Loading branch information
hrydgard committed Dec 29, 2023
1 parent 71f1e29 commit 4b027ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Core/WebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ bool RemoteISOFileSupported(const std::string &filename) {
}

static std::string RemotePathForRecent(const std::string &filename) {
Path path(filename);
if (path.Type() == PathType::HTTP) {
// Don't re-share HTTP files from some other device.
return std::string();
}

#ifdef _WIN32
static const std::string sep = "\\/";
#else
Expand All @@ -161,7 +167,8 @@ static std::string RemotePathForRecent(const std::string &filename) {
if (RemoteISOFileSupported(basename)) {
return ServerUriEncode(basename);
}
return "";

return std::string();
}

static Path LocalFromRemotePath(const std::string &path) {
Expand Down

0 comments on commit 4b027ba

Please sign in to comment.