session_rpcserver: nil check on MacaroonRecipe

This commit is contained in:
Elle Mouton 2022-12-02 16:09:40 +02:00
parent cfc0de1a9e
commit fbe32230b1
No known key found for this signature in database
GPG key ID: D7D916376026F177

View file

@ -323,7 +323,9 @@ func (s *sessionRpcServer) resumeSession(sess *session.Session) error {
// For custom session types, we use the caveats and permissions that
// were persisted on session creation.
case session.TypeMacaroonCustom:
permissions = sess.MacaroonRecipe.Permissions
if sess.MacaroonRecipe != nil {
permissions = sess.MacaroonRecipe.Permissions
}
// No other types are currently supported.
default: