diff options
author | Roland Reichwein <mail@reichwein.it> | 2021-09-24 11:02:21 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2021-09-24 11:02:21 +0200 |
commit | 9a40db34cd48b776023e3558a855458fa4f9d264 (patch) | |
tree | b7458e4702fa01a73adc78c73563590cb8d684f3 /plugins/static-files | |
parent | 108dec000f813e1ba54dfc2a59a9dfe028cca414 (diff) |
webserver version 1.14: Bugfix: URL decode in static files
Diffstat (limited to 'plugins/static-files')
-rw-r--r-- | plugins/static-files/static-files.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <boost/algorithm/string/predicate.hpp> @@ -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); |