Request: createPairFromVar(): Explicitly decode value
May not be the case on POST requests.
这个提交包含在:
父节点
91951abe9c
当前提交
82c081385b
@ -40,7 +40,7 @@ std::pair<std::string, std::string> Request::createPairFromVar(std::string var)
|
||||
else
|
||||
{
|
||||
std::string key = var.substr(0, equal);
|
||||
std::string val = utils::html_xss(var.substr(equal + 1));
|
||||
std::string val = utils::html_xss(utils::urldecode(var.substr(equal + 1)));
|
||||
return std::make_pair(std::move(key), std::move(val));
|
||||
}
|
||||
}
|
||||
@ -75,7 +75,7 @@ void Request::initPostMap(const std::string &url)
|
||||
void Request::initCookies(const std::string &cookiestr)
|
||||
{
|
||||
// TODO: find out what it really should be, ";" or "; "?
|
||||
std::regex regex { ";+\\s?" };
|
||||
std::regex regex{";+\\s?"};
|
||||
auto cookiesplitted = utils::split(cookiestr, regex);
|
||||
for(const std::string &part : cookiesplitted)
|
||||
{
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户