Remote ISO: Don't expose HTTP paths from recent for "re-sharing", won't work.

This commit is contained in:
Henrik Rydgård 2023-12-29 12:53:53 +01:00
parent 71f1e29513
commit 4b027baeb6

View file

@ -142,6 +142,12 @@ bool RemoteISOFileSupported(const std::string &filename) {
} }
static std::string RemotePathForRecent(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 #ifdef _WIN32
static const std::string sep = "\\/"; static const std::string sep = "\\/";
#else #else
@ -161,7 +167,8 @@ static std::string RemotePathForRecent(const std::string &filename) {
if (RemoteISOFileSupported(basename)) { if (RemoteISOFileSupported(basename)) {
return ServerUriEncode(basename); return ServerUriEncode(basename);
} }
return "";
return std::string();
} }
static Path LocalFromRemotePath(const std::string &path) { static Path LocalFromRemotePath(const std::string &path) {