mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
fix token
This commit is contained in:
parent
80aa4ce207
commit
6bb29fed18
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user