diff --git a/wshandler/wshandler.go b/wshandler/wshandler.go index f91df26..8c57834 100644 --- a/wshandler/wshandler.go +++ b/wshandler/wshandler.go @@ -3,6 +3,7 @@ package wshandler import ( "bytes" "context" + "encoding/base64" "encoding/gob" "encoding/hex" "encoding/json" @@ -608,7 +609,8 @@ func (sh *subhandler) upgrade_nosession(w http.ResponseWriter, r *http.Request) var alias string if v := r.Header.Get("AS-X-ALIAS"); len(v) > 0 { - alias = v + vt, _ := base64.StdEncoding.DecodeString(v) + alias = string(vt) } else { alias = accid.Hex() } @@ -659,7 +661,8 @@ func (sh *subhandler) upgrade(w http.ResponseWriter, r *http.Request) { var alias string if v := r.Header.Get("AS-X-ALIAS"); len(v) > 0 { - alias = v + vt, _ := base64.StdEncoding.DecodeString(v) + alias = string(vt) } else { alias = authinfo.Accid.Hex() }