From 4b027baeb6543fb65bf58a5ee740c6bf0d5b20b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 29 Dec 2023 12:53:53 +0100 Subject: [PATCH] Remote ISO: Don't expose HTTP paths from recent for "re-sharing", won't work. --- Core/WebServer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Core/WebServer.cpp b/Core/WebServer.cpp index 6f70937474ef..af465fd1ae28 100644 --- a/Core/WebServer.cpp +++ b/Core/WebServer.cpp @@ -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 @@ -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) {