mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 02:17:30 +08:00
add some
This commit is contained in:
parent
4bb96d905d
commit
f769841c33
@ -198,6 +198,7 @@ func _serve_handle(key string, cmd *ice.Command, m *ice.Message, w http.Response
|
||||
})
|
||||
UserHost(m)
|
||||
for k, v := range m.R.Header {
|
||||
m.Info("what %v %v", k, v)
|
||||
kit.If(strings.HasPrefix(k, "Wechatpay"), func() { m.Option(k, v) })
|
||||
}
|
||||
m.W.Header().Add(strings.ReplaceAll(ice.LOG_TRACEID, ".", "-"), m.Option(ice.LOG_TRACEID))
|
||||
|
@ -125,7 +125,7 @@ func init() {
|
||||
RenderPodCmd(m, msg.Append(SPACE), msg.Append(mdb.NAME), kit.UnMarshal(msg.Append(mdb.TEXT)))
|
||||
}
|
||||
case DOWNLOAD:
|
||||
m.RenderDownload(msg.Append(mdb.TEXT))
|
||||
m.RenderDownload(msg.Append(mdb.TEXT), msg.Append(mdb.TYPE), msg.Append(mdb.NAME))
|
||||
default:
|
||||
RenderMain(m)
|
||||
}
|
||||
|
1
conf.go
1
conf.go
@ -235,6 +235,7 @@ const ( // MSG
|
||||
MSG_USERZONE = "user.zone"
|
||||
MSG_LANGUAGE = "user.lang"
|
||||
MSG_AVATAR = "user.avatar"
|
||||
MSG_USERUID = "user.uid"
|
||||
|
||||
MSG_BG = "sess.bg"
|
||||
MSG_FG = "sess.fg"
|
||||
|
@ -170,7 +170,8 @@ func (s Client) Login2(m *ice.Message, arg ...string) {
|
||||
if msg.Option(SESS_CMD) != "" {
|
||||
m.Cmdy(kit.Split(msg.Option(SESS_CMD)), kit.Dict("user_uid", msg.Option("user_uid")))
|
||||
} else {
|
||||
m.ProcessCookie(ice.MSG_SESSID, aaa.SessCreate(m.Message, msg.Option(aaa.USERNAME)), "-2")
|
||||
// m.ProcessCookie(ice.MSG_SESSID, aaa.SessCreate(m.Message, msg.Option(aaa.USERNAME)), "-2")
|
||||
m.ProcessCookie(ice.MSG_SESSID, aaa.SessCreate(m.Message, msg.Option(aaa.USERNAME)), "-3")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,22 @@ const POD = "pod"
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
POD: {Help: "空间", Actions: web.ApiWhiteAction(), Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.IsWeixinUA() && m.Option(ice.MSG_USERNAME) == "" {
|
||||
template := func(script string) string { return kit.Format(`<html><body><script>%s</script></body></html>`, script) }
|
||||
if m.Option("code") == "" && m.Option("state") == "" {
|
||||
if msg := m.Cmd(web.SPACE, "20240724-community", "web.chat.wx.agent"); msg.Option("oauth") != "" {
|
||||
m.RenderResult(kit.Format(template(`document.cookie = "goback=%s;path=/"; location.href = "%s"`),
|
||||
m.R.URL.String(), msg.Option("oauth")))
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if msg := m.Cmd(web.SPACE, "20240724-community", "web.chat.oauth.client", "action", "login2"); msg.Option("_arg") != "" {
|
||||
m.RenderResult(kit.Format(template(`document.cookie = "sessid=%s;path=/"; location.href = "%s"; document.cookie = "goback=;path=/;expires=Mon, 19 May 2025 00:52:51 GMT"`),
|
||||
kit.Simple(msg.Optionv("_arg"))[1], m.Option("goback")))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if m.IsCliUA() {
|
||||
if len(arg) == 0 || arg[0] == "" {
|
||||
m.Option(ice.MSG_USERROLE, aaa.TECH)
|
||||
|
Loading…
x
Reference in New Issue
Block a user