1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00

fix token

This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-12-30 21:11:51 +08:00
parent 80aa4ce207
commit 6bb29fed18

View File

@ -37,8 +37,8 @@ func BasicCheck(m *ice.Message, realm string) bool {
switch ls := kit.Split(m.R.Header.Get(html.Authorization)); kit.Select("", ls, 0) {
case html.Basic:
if buf, err := base64.StdEncoding.DecodeString(kit.Select("", ls, 1)); !m.Warn(err) {
if ls := strings.SplitN(string(buf), ":", 2); !m.Warn(len(ls) < 2) {
if msg := m.Cmd(TOKEN, ls[1]); !m.Warn(msg.Time() > msg.Append(mdb.TIME)) {
if ls := strings.SplitN(string(buf), ":", 2); !m.Warn(len(ls) < 2 || ls[1] == "", ice.ErrNotValid, html.Basic) {
if msg := m.Cmd(TOKEN, ls[1]); !m.Warn(msg.Time() > msg.Append(mdb.TIME), ice.ErrNotValid) {
return true
}
}