mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-27 00:02:51 +08:00
update 2026-09-29 18:19:55
This commit is contained in:
1 parent
8e341971ff
commit
cb2fdad301
2 files changed
+9
No files matched your search
@@ -13,6 +13,10 @@
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"cgi-io": [ "upload" ],
|
||||
"file": {
|
||||
"/tmp/oxidns-core-upload-*": [ "write" ]
|
||||
},
|
||||
"ubus": {
|
||||
"luci.oxidns": [
|
||||
"core_install",
|
||||
|
||||
@@ -1779,6 +1779,9 @@ local function curl(url, file, ua, mode)
|
||||
ua = (ua == "passwall") and ("passwall/" .. api.get_version()) or ua
|
||||
curl_args[#curl_args + 1] = '--user-agent "' .. ua .. '"'
|
||||
|
||||
local cookie_file = "/tmp/cookie_" .. api.gen_random_char(5)
|
||||
curl_args[#curl_args + 1] = '-c "' .. cookie_file .. '" -b "' .. cookie_file .. '"'
|
||||
|
||||
local return_code, result
|
||||
if mode == "direct" then
|
||||
return_code, result = api.curl_base(url, file, curl_args)
|
||||
@@ -1801,6 +1804,8 @@ local function curl(url, file, ua, mode)
|
||||
header_str = header_str:gsub("\r", "")
|
||||
end
|
||||
|
||||
luci.sys.call('rm -f "%s"' % cookie_file)
|
||||
|
||||
return return_code, http_code, header_str
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user