summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-30 13:46:36 +0800
committerruki <[email protected]>2022-04-30 13:46:36 +0800
commit90baae21a2c23777eb958edbe60da8aaf490f09d (patch)
tree6bf410aab484a2c1d5f36afc2438571ea87de354
parent3e5184e79053d3c270f63bfe9d66a5547d2efb14 (diff)
use md5 as auth
-rw-r--r--xmake/modules/private/service/add_user.lua2
-rw-r--r--xmake/modules/private/service/config.lua2
-rw-r--r--xmake/modules/private/service/remote_build/client.lua2
-rw-r--r--xmake/modules/private/service/rm_user.lua2
4 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/private/service/add_user.lua b/xmake/modules/private/service/add_user.lua
index 99a1c9546..8474de089 100644
--- a/xmake/modules/private/service/add_user.lua
+++ b/xmake/modules/private/service/add_user.lua
@@ -37,7 +37,7 @@ function main(user)
-- compute user authorization
local auth = base64.encode(user .. ":" .. pass)
- auth = hash.sha256(bytes(auth))
+ auth = hash.md5(bytes(auth))
-- save to configs
local configs = assert(config.configs(), "configs not found!")
diff --git a/xmake/modules/private/service/config.lua b/xmake/modules/private/service/config.lua
index 73b203c05..0ad28a31e 100644
--- a/xmake/modules/private/service/config.lua
+++ b/xmake/modules/private/service/config.lua
@@ -29,7 +29,7 @@ function _generate_configfile()
assert(not _g.configs and not os.isfile(filepath))
local servicedir = path.join(global.directory(), "service")
local initauth = base64.encode("root:000000")
- initauth = hash.sha256(bytes(initauth))
+ initauth = hash.md5(bytes(initauth))
local configs = {
logfile = path.join(servicedir, "logs.txt"),
server = {
diff --git a/xmake/modules/private/service/remote_build/client.lua b/xmake/modules/private/service/remote_build/client.lua
index c6106b78b..a53e265df 100644
--- a/xmake/modules/private/service/remote_build/client.lua
+++ b/xmake/modules/private/service/remote_build/client.lua
@@ -90,7 +90,7 @@ function remote_build_client:connect()
-- compute user authorization
auth = base64.encode(self:user() .. ":" .. pass)
- auth = hash.sha256(bytes(auth))
+ auth = hash.md5(bytes(auth))
end
-- do connect
diff --git a/xmake/modules/private/service/rm_user.lua b/xmake/modules/private/service/rm_user.lua
index 793d7df1e..4dfe86a22 100644
--- a/xmake/modules/private/service/rm_user.lua
+++ b/xmake/modules/private/service/rm_user.lua
@@ -37,7 +37,7 @@ function main(user)
-- compute user authorization
local auth = base64.encode(user .. ":" .. pass)
- auth = hash.sha256(bytes(auth))
+ auth = hash.md5(bytes(auth))
-- save to configs
local configs = assert(config.configs(), "configs not found!")