bridgev2/provisioning: ensure that Start returns a non-nil first step
Some checks failed
Go / Lint (latest) (push) Has been cancelled
Go / Build (old, libolm) (push) Has been cancelled
Go / Build (latest, libolm) (push) Has been cancelled
Go / Build (old, goolm) (push) Has been cancelled
Go / Build (latest, goolm) (push) Has been cancelled

This commit is contained in:
Tulir Asokan 2025-06-06 14:08:04 +03:00
commit d296f7b660

View file

@ -390,6 +390,10 @@ func (prov *ProvisioningAPI) PostLoginStart(w http.ResponseWriter, r *http.Reque
zerolog.Ctx(r.Context()).Err(err).Msg("Failed to start login")
RespondWithError(w, err, "Internal error starting login")
return
} else if firstStep == nil {
zerolog.Ctx(r.Context()).Error().Msg("Bridge returned nil first step in Start with no error")
RespondWithError(w, err, "Internal error starting login")
return
}
loginID := xid.New().String()
prov.loginsLock.Lock()