Fix a bug which will cause /getruleset for Surge unable to fetch data

Add descriptions in pref.ini.
This commit is contained in:
Tindy X committed 2020-02-15 23:29:11 +08:00
1 parent 16092f6946
commit 41b9f97d4c
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
std::string url = urlsafe_base64_decode(getUrlArg(argument, "url")), type = getUrlArg(argument, "type"), group = urlsafe_base64_decode(getUrlArg(argument, "group"));
std::string output_content;
if(!url.size() || !type.size() || !group.size() || (type != "1" && type != "2"))
if(!url.size() || !type.size() || (type == "2" && !group.size()) || (type != "1" && type != "2"))
{
*status_code = 400;
return "Invalid request!";