Adjust tofu token check

This commit is contained in:
Jeff Mitchell committed 2024-02-06 15:04:02 -05:00
1 parent eb6d0dbd6a
commit 483f13226e
1 file changed
+1 -1
+1 -1
View File
@@ -147,7 +147,7 @@ func (w *Worker) handleProxy(listenerCfg *listenerutil.ListenerConfig, sessionMa
}
return
}
if len(handshake.GetTofuToken()) < 20 {
if len(handshake.GetTofuToken()) != 20 {
event.WriteError(ctx, op, stderrors.New("invalid tofu token"))
if err = conn.Close(websocket.StatusUnsupportedData, "invalid tofu token"); err != nil {
event.WriteError(ctx, op, err, event.WithInfoMsg("error closing client connection"))