mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Enhancements
Fix missing keys and sections in Mellow configs. Fix Emoji matching rules. Add token verification when using default_urls in API mode. Optimize codes.
This commit is contained in:
4 files changed
+12
-21
No files matched your search
+1
-13
@@ -669,7 +669,7 @@ std::string fileGet(std::string path, bool binary, bool scope_limit)
|
||||
if(scope_limit)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if(path.find(":/") != path.npos || path.find("..") != path.npos)
|
||||
if(path.find(":\\") != path.npos || path.find("..") != path.npos)
|
||||
return std::string();
|
||||
#else
|
||||
if(path.find("/") == 0 || path.find("..") != path.npos)
|
||||
@@ -916,11 +916,8 @@ std::string getFormData(const std::string &raw_data)
|
||||
std::string line;
|
||||
|
||||
std::string boundary;
|
||||
std::string disp; /* content disposition string */
|
||||
std::string type; /* content type string */
|
||||
std::string file; /* actual file content */
|
||||
|
||||
|
||||
int i = 0;
|
||||
|
||||
strstrm<<raw_data;
|
||||
@@ -932,18 +929,9 @@ std::string getFormData(const std::string &raw_data)
|
||||
// Get boundary
|
||||
boundary = line.substr(0, line.length() - 1);
|
||||
}
|
||||
else if(line.find("Content-Disposition") == 0)
|
||||
{
|
||||
disp = line;
|
||||
}
|
||||
else if(line.find("Content-Type") == 0)
|
||||
{
|
||||
type = line;
|
||||
}
|
||||
else if(line.find(boundary) == 0)
|
||||
{
|
||||
// The end
|
||||
type = line;
|
||||
break;
|
||||
}
|
||||
else if(line.length() == 1)
|
||||
|
||||
Reference in new issue
Block a user