From 9a40db34cd48b776023e3558a855458fa4f9d264 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 24 Sep 2021 11:02:21 +0200 Subject: webserver version 1.14: Bugfix: URL decode in static files --- plugins/static-files/static-files.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/static-files') diff --git a/plugins/static-files/static-files.cpp b/plugins/static-files/static-files.cpp index b2dcdca..ad78e48 100644 --- a/plugins/static-files/static-files.cpp +++ b/plugins/static-files/static-files.cpp @@ -1,6 +1,7 @@ #include "static-files.h" #include "libcommon/mime.h" +#include "libcommon/url.h" #include @@ -81,7 +82,7 @@ std::string static_files_plugin::generate_page( if (pos != target.npos) target = target.substr(0, pos); - std::string rel_target{GetRequestParam("rel_target")}; + std::string rel_target{urlDecode(GetRequestParam("rel_target"))}; pos = rel_target.find('?'); if (pos != rel_target.npos) rel_target = rel_target.substr(0, pos); -- cgit v1.2.3